blob: 4adc0313ecd366d2fe86ac3a48949be8f70b9d8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
"""
.. autosummary::
module_attr
C.class_attr
C.instance_attr
C.prop_attr1
C.prop_attr2
C.C2
"""
def withSentence():
'''I have a sentence which
spans multiple lines. Then I have
more stuff
'''
pass
def noSentence():
'''this doesn't start with a
capital. so it's not considered
a sentence
'''
pass
def emptyLine():
'''This is the real summary
However, it did't end with a period.
'''
pass
#: 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 __init__(self):
#: This is an instance attribute
#:
#: value is a string
self.instance_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.
"""
class C2:
'''
This is a nested inner class docstring
'''
def func(arg_, *args, **kwargs):
"""Test function take an argument ended with underscore."""
|