2014-04-11 09:38:37 -05:00
|
|
|
"""
|
|
|
|
.. autosummary::
|
|
|
|
|
|
|
|
module_attr
|
|
|
|
C.class_attr
|
|
|
|
C.prop_attr1
|
|
|
|
C.prop_attr2
|
2014-06-21 03:05:31 -05:00
|
|
|
C.C2
|
2014-04-11 09:38:37 -05:00
|
|
|
"""
|
2014-03-01 01:42:35 -06:00
|
|
|
|
2018-02-19 07:39:14 -06:00
|
|
|
|
2014-03-01 01:42:35 -06:00
|
|
|
def withSentence():
|
|
|
|
'''I have a sentence which
|
|
|
|
spans multiple lines. Then I have
|
|
|
|
more stuff
|
|
|
|
'''
|
|
|
|
pass
|
|
|
|
|
2018-02-19 07:39:14 -06:00
|
|
|
|
2014-03-01 01:42:35 -06:00
|
|
|
def noSentence():
|
|
|
|
'''this doesn't start with a
|
|
|
|
capital. so it's not considered
|
|
|
|
a sentence
|
|
|
|
'''
|
|
|
|
pass
|
|
|
|
|
2018-02-19 07:39:14 -06:00
|
|
|
|
2014-03-01 01:42:35 -06:00
|
|
|
def emptyLine():
|
|
|
|
'''This is the real summary
|
|
|
|
|
|
|
|
However, it did't end with a period.
|
|
|
|
'''
|
|
|
|
pass
|
2014-04-11 09:38:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
#: This is a module attribute
|
|
|
|
#:
|
|
|
|
#: value is integer.
|
|
|
|
module_attr = 1
|
|
|
|
|
|
|
|
|
|
|
|
class C:
|
|
|
|
'''
|
|
|
|
My C class
|
|
|
|
|
|
|
|
with class_attr attribute
|
|
|
|
'''
|
|
|
|
|
|
|
|
#: This is a class attribute
|
|
|
|
#:
|
|
|
|
#: value is integer.
|
|
|
|
class_attr = 42
|
|
|
|
|
|
|
|
def _prop_attr_get(self):
|
|
|
|
"""
|
|
|
|
This is a function docstring
|
|
|
|
|
|
|
|
return value is string.
|
|
|
|
"""
|
|
|
|
return 'spam egg'
|
|
|
|
|
|
|
|
prop_attr1 = property(_prop_attr_get)
|
|
|
|
|
|
|
|
prop_attr2 = property(_prop_attr_get)
|
|
|
|
"""
|
|
|
|
This is a attribute docstring
|
|
|
|
|
|
|
|
value is string.
|
|
|
|
"""
|
2014-06-21 03:05:31 -05:00
|
|
|
|
|
|
|
class C2:
|
|
|
|
'''
|
|
|
|
This is a nested inner class docstring
|
|
|
|
'''
|
2016-08-29 10:37:30 -05:00
|
|
|
|
|
|
|
|
2017-01-21 00:50:41 -06:00
|
|
|
def func(arg_, *args, **kwargs):
|
2016-08-29 10:37:30 -05:00
|
|
|
"""Test function take an argument ended with underscore."""
|