python笔记, python 生成注释

来源:互联网 发布:字幕滚动编辑软件 编辑:程序博客网 时间:2024/05/19 20:37
>>> class A():'''please        '''def __init__(self):pass>>> a = A()>>> def fun():'''what is it'''pass>>> print fun.__doc__what is it>>> print a.__doc__please

注意应该是.__doc__方法,不是.__doc__()

长注释应该写在类名或方法名所在行之后

用长注释符号括起

原创粉丝点击