时间:2021-07-01 10:21:17 帮助过:62人阅读
python的类注释是可以通过代码访问的,这样非常利于书写说明文档
class Foo: passclass Bar: """Representation of a Bar""" passassert Foo.__doc__ == Noneassert Bar.__doc__ == "Representation of a Bar"
希望本文所述对大家的Python程序设计有所帮助。
< 上一篇
Python中使用hashlib模块处理算法的教程
下一篇 >
Python封装shell命令实例分析
记住我的登录 忘记密码?
登录
我已阅读用户协议及版权声明
注册