Python - 查看类的方法和属性,dir(),help()
1. dir()查看类的方法和属性
dir([object])
2.help()查看函数或模块用途的详细说明
help([object])
3.查看具体类中某方法的详细说明
help(object.method_name)
例如:查看slice类中的indices方法
help(slice.indices)
dir([object])
help([object])
help(object.method_name)
例如:查看slice类中的indices方法
help(slice.indices)
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。