C
Colin J. Williams
Is there some way that the user can access the docstring specified for a
property?
Please see the example below:
# propDocTest
class A(object):
def __init__(self, value):
self.value= value
def vGet(self):
return self.value
V= property (fget= vGet, doc="Get Value.")
a= A(22)
print a.vGet()
print a.V
print a.V.__doc__ # this gives the docstring for the value returned
help(a.V) # this gives the docstring for the class/type of
the value returned
Colin W.
property?
Please see the example below:
# propDocTest
class A(object):
def __init__(self, value):
self.value= value
def vGet(self):
return self.value
V= property (fget= vGet, doc="Get Value.")
a= A(22)
print a.vGet()
print a.V
print a.V.__doc__ # this gives the docstring for the value returned
help(a.V) # this gives the docstring for the class/type of
the value returned
Colin W.