0001 """Something just to look at via pydoc.""" 0002 0003 class A_classic: 0004 "A classic class." 0005 def A_method(self): 0006 "Method defined in A." 0007 def AB_method(self): 0008 "Method defined in A and B." 0009 def AC_method(self): 0010 "Method defined in A and C." 0011 def AD_method(self): 0012 "Method defined in A and D." 0013 def ABC_method(self): 0014 "Method defined in A, B and C." 0015 def ABD_method(self): 0016 "Method defined in A, B and D." 0017 def ACD_method(self): 0018 "Method defined in A, C and D." 0019 def ABCD_method(self): 0020 "Method defined in A, B, C and D." 0021 0022 0023 class B_classic(A_classic): 0024 "A classic class, derived from A_classic." 0025 def AB_method(self): 0026 "Method defined in A and B." 0027 def ABC_method(self): 0028 "Method defined in A, B and C." 0029 def ABD_method(self): 0030 "Method defined in A, B and D." 0031 def ABCD_method(self): 0032 "Method defined in A, B, C and D." 0033 def B_method(self): 0034 "Method defined in B." 0035 def BC_method(self): 0036 "Method defined in B and C." 0037 def BD_method(self): 0038 "Method defined in B and D." 0039 def BCD_method(self): 0040 "Method defined in B, C and D." 0041 0042 class C_classic(A_classic): 0043 "A classic class, derived from A_classic." 0044 def AC_method(self): 0045 "Method defined in A and C." 0046 def ABC_method(self): 0047 "Method defined in A, B and C." 0048 def ACD_method(self): 0049 "Method defined in A, C and D." 0050 def ABCD_method(self): 0051 "Method defined in A, B, C and D." 0052 def BC_method(self): 0053 "Method defined in B and C." 0054 def BCD_method(self): 0055 "Method defined in B, C and D." 0056 def C_method(self): 0057 "Method defined in C." 0058 def CD_method(self): 0059 "Method defined in C and D." 0060 0061 class D_classic(B_classic, C_classic): 0062 "A classic class, derived from B_classic and C_classic." 0063 def AD_method(self): 0064 "Method defined in A and D." 0065 def ABD_method(self): 0066 "Method defined in A, B and D." 0067 def ACD_method(self): 0068 "Method defined in A, C and D." 0069 def ABCD_method(self): 0070 "Method defined in A, B, C and D." 0071 def BD_method(self): 0072 "Method defined in B and D." 0073 def BCD_method(self): 0074 "Method defined in B, C and D." 0075 def CD_method(self): 0076 "Method defined in C and D." 0077 def D_method(self): 0078 "Method defined in D." 0079 0080 0081 class A_new(object): 0082 "A new-style class." 0083 0084 def A_method(self): 0085 "Method defined in A." 0086 def AB_method(self): 0087 "Method defined in A and B." 0088 def AC_method(self): 0089 "Method defined in A and C." 0090 def AD_method(self): 0091 "Method defined in A and D." 0092 def ABC_method(self): 0093 "Method defined in A, B and C." 0094 def ABD_method(self): 0095 "Method defined in A, B and D." 0096 def ACD_method(self): 0097 "Method defined in A, C and D." 0098 def ABCD_method(self): 0099 "Method defined in A, B, C and D." 0100 0101 def A_classmethod(cls, x): 0102 "A class method defined in A." 0103 A_classmethod = classmethod(A_classmethod) 0104 0105 def A_staticmethod(): 0106 "A static method defined in A." 0107 A_staticmethod = staticmethod(A_staticmethod) 0108 0109 def _getx(self): 0110 "A property getter function." 0111 def _setx(self, value): 0112 "A property setter function." 0113 def _delx(self): 0114 "A property deleter function." 0115 A_property = property(fdel=_delx, fget=_getx, fset=_setx, 0116 doc="A sample property defined in A.") 0117 0118 A_int_alias = int 0119 0120 class B_new(A_new): 0121 "A new-style class, derived from A_new." 0122 0123 def AB_method(self): 0124 "Method defined in A and B." 0125 def ABC_method(self): 0126 "Method defined in A, B and C." 0127 def ABD_method(self): 0128 "Method defined in A, B and D." 0129 def ABCD_method(self): 0130 "Method defined in A, B, C and D." 0131 def B_method(self): 0132 "Method defined in B." 0133 def BC_method(self): 0134 "Method defined in B and C." 0135 def BD_method(self): 0136 "Method defined in B and D." 0137 def BCD_method(self): 0138 "Method defined in B, C and D." 0139 0140 class C_new(A_new): 0141 "A new-style class, derived from A_new." 0142 0143 def AC_method(self): 0144 "Method defined in A and C." 0145 def ABC_method(self): 0146 "Method defined in A, B and C." 0147 def ACD_method(self): 0148 "Method defined in A, C and D." 0149 def ABCD_method(self): 0150 "Method defined in A, B, C and D." 0151 def BC_method(self): 0152 "Method defined in B and C." 0153 def BCD_method(self): 0154 "Method defined in B, C and D." 0155 def C_method(self): 0156 "Method defined in C." 0157 def CD_method(self): 0158 "Method defined in C and D." 0159 0160 class D_new(B_new, C_new): 0161 """A new-style class, derived from B_new and C_new. 0162 """ 0163 0164 def AD_method(self): 0165 "Method defined in A and D." 0166 def ABD_method(self): 0167 "Method defined in A, B and D." 0168 def ACD_method(self): 0169 "Method defined in A, C and D." 0170 def ABCD_method(self): 0171 "Method defined in A, B, C and D." 0172 def BD_method(self): 0173 "Method defined in B and D." 0174 def BCD_method(self): 0175 "Method defined in B, C and D." 0176 def CD_method(self): 0177 "Method defined in C and D." 0178 def D_method(self): 0179 "Method defined in D." 0180 0181 class FunkyProperties(object): 0182 """From SF bug 472347, by Roeland Rengelink. 0183 0184 Property getters etc may not be vanilla functions or methods, 0185 and this used to make GUI pydoc blow up. 0186 """ 0187 0188 def __init__(self): 0189 self.desc = {'x':0} 0190 0191 class get_desc: 0192 def __init__(self, attr): 0193 self.attr = attr 0194 def __call__(self, inst): 0195 print 'Get called', self, inst 0196 return inst.desc[self.attr] 0197 class set_desc: 0198 def __init__(self, attr): 0199 self.attr = attr 0200 def __call__(self, inst, val): 0201 print 'Set called', self, inst, val 0202 inst.desc[self.attr] = val 0203 class del_desc: 0204 def __init__(self, attr): 0205 self.attr = attr 0206 def __call__(self, inst): 0207 print 'Del called', self, inst 0208 del inst.desc[self.attr] 0209 0210 x = property(get_desc('x'), set_desc('x'), del_desc('x'), 'prop x') 0211
Generated by PyXR 0.9.4