文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>python的列表过滤

python的列表过滤

时间:2006-07-04  来源:CUDev

python的列表过滤


 methodList = [method for method in dir(object) if callable(getattr(object, method))]

如果了解shell的话,这个将很好理解:

for method in dir(object)
do
if [ callable(getattr(object, method)) ];then
print $method
fi
done
相关阅读 更多 +
排行榜 更多 +
疯狂军旗游戏

疯狂军旗游戏

飞行射击 下载
火柴人激烈乱斗最新版

火柴人激烈乱斗最新版

冒险解谜 下载
米加小镇家庭屋

米加小镇家庭屋

休闲益智 下载