By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,035 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,035 IT Pros & Developers. It's quick & easy.

How do I access the property info in this example ?

P: n/a
How do I access the property information in this example ?

class C(object):
def getx(self): return self.__x
def setx(self, value): self.__x = value
def delx(self): del self.__x
x = property(getx, setx, delx, "I'm the 'x' property.")

I would like to get at ...

"I'm the 'x' property."

.... if at all possible.

TIA

Oct 26 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
David Poundall enlightened us with:
class C(object):
def getx(self): return self.__x
def setx(self, value): self.__x = value
def delx(self): del self.__x
x = property(getx, setx, delx, "I'm the 'x' property.")

I would like to get at ...

"I'm the 'x' property."


As usual: C.x.__doc__

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Oct 26 '05 #2

P: n/a
Thanks - I was trying to do ....

c = C()
print c.x.__doc__

my mistake.

Oct 26 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.