[Python] python中访问类的docstring注释的方法 →→→→→进入此内容的聊天室

来自 , 2020-06-10, 写在 Python, 查看 113 次.
URL http://www.code666.cn/view/5d700922
  1. class Foo:
  2.     pass
  3.  
  4. class Bar:
  5.     """Representation of a Bar"""
  6.     pass
  7.  
  8. assert Foo.__doc__ == None
  9. assert Bar.__doc__ == "Representation of a Bar"

回复 "python中访问类的docstring注释的方法"

这儿你可以回复上面这条便签

captcha