stick in a documentation string for your attribute : Method : Class PYTHON TUTORIALS


PYTHON TUTORIALS » Class » Method »

 

stick in a documentation string for your attribute


from math import pi

def get_pi(dummy):
    return pi

class PI(object):
    pi = property(get_pi, doc='Constant "pi"')

inst = PI()
print inst.pi
print PI.pi.__doc__



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Class
» Method