1 """Something just to look at via pydoc."""
10 "Method defined in A and B."
12 "Method defined in A and C."
14 "Method defined in A and D."
16 "Method defined in A, B and C."
18 "Method defined in A, B and D."
20 "Method defined in A, C and D."
21 def ABCD_method(self
):
22 "Method defined in A, B, C and D."
25 class B_classic(A_classic
):
26 "A classic class, derived from A_classic."
28 "Method defined in A and B."
30 "Method defined in A, B and C."
32 "Method defined in A, B and D."
33 def ABCD_method(self
):
34 "Method defined in A, B, C and D."
36 "Method defined in B."
38 "Method defined in B and C."
40 "Method defined in B and D."
42 "Method defined in B, C and D."
44 class C_classic(A_classic
):
45 "A classic class, derived from A_classic."
47 "Method defined in A and C."
49 "Method defined in A, B and C."
51 "Method defined in A, C and D."
52 def ABCD_method(self
):
53 "Method defined in A, B, C and D."
55 "Method defined in B and C."
57 "Method defined in B, C and D."
59 "Method defined in C."
61 "Method defined in C and D."
63 class D_classic(B_classic
, C_classic
):
64 "A classic class, derived from B_classic and C_classic."
66 "Method defined in A and D."
68 "Method defined in A, B and D."
70 "Method defined in A, C and D."
71 def ABCD_method(self
):
72 "Method defined in A, B, C and D."
74 "Method defined in B and D."
76 "Method defined in B, C and D."
78 "Method defined in C and D."
80 "Method defined in D."
87 "Method defined in A."
89 "Method defined in A and B."
91 "Method defined in A and C."
93 "Method defined in A and D."
95 "Method defined in A, B and C."
97 "Method defined in A, B and D."
99 "Method defined in A, C and D."
100 def ABCD_method(self
):
101 "Method defined in A, B, C and D."
103 def A_classmethod(cls
, x
):
104 "A class method defined in A."
105 A_classmethod
= classmethod(A_classmethod
)
107 def A_staticmethod():
108 "A static method defined in A."
109 A_staticmethod
= staticmethod(A_staticmethod
)
112 "A property getter function."
113 def _setx(self
, value
):
114 "A property setter function."
116 "A property deleter function."
117 A_property
= property(fdel
=_delx
, fget
=_getx
, fset
=_setx
,
118 doc
="A sample property defined in A.")
123 "A new-style class, derived from A_new."
126 "Method defined in A and B."
127 def ABC_method(self
):
128 "Method defined in A, B and C."
129 def ABD_method(self
):
130 "Method defined in A, B and D."
131 def ABCD_method(self
):
132 "Method defined in A, B, C and D."
134 "Method defined in B."
136 "Method defined in B and C."
138 "Method defined in B and D."
139 def BCD_method(self
):
140 "Method defined in B, C and D."
143 "A new-style class, derived from A_new."
146 "Method defined in A and C."
147 def ABC_method(self
):
148 "Method defined in A, B and C."
149 def ACD_method(self
):
150 "Method defined in A, C and D."
151 def ABCD_method(self
):
152 "Method defined in A, B, C and D."
154 "Method defined in B and C."
155 def BCD_method(self
):
156 "Method defined in B, C and D."
158 "Method defined in C."
160 "Method defined in C and D."
162 class D_new(B_new
, C_new
):
163 """A new-style class, derived from B_new and C_new.
167 "Method defined in A and D."
168 def ABD_method(self
):
169 "Method defined in A, B and D."
170 def ACD_method(self
):
171 "Method defined in A, C and D."
172 def ABCD_method(self
):
173 "Method defined in A, B, C and D."
175 "Method defined in B and D."
176 def BCD_method(self
):
177 "Method defined in B, C and D."
179 "Method defined in C and D."
181 "Method defined in D."
183 class FunkyProperties(object):
184 """From SF bug 472347, by Roeland Rengelink.
186 Property getters etc may not be vanilla functions or methods,
187 and this used to make GUI pydoc blow up.
194 def __init__(self
, attr
):
196 def __call__(self
, inst
):
197 print 'Get called', self
, inst
198 return inst
.desc
[self
.attr
]
200 def __init__(self
, attr
):
202 def __call__(self
, inst
, val
):
203 print 'Set called', self
, inst
, val
204 inst
.desc
[self
.attr
] = val
206 def __init__(self
, attr
):
208 def __call__(self
, inst
):
209 print 'Del called', self
, inst
210 del inst
.desc
[self
.attr
]
212 x
= property(get_desc('x'), set_desc('x'), del_desc('x'), 'prop x')
215 submodule
= types
.ModuleType(__name__
+ '.submodule',
216 """A submodule, which should appear in its parent's summary""")