How do I access the property info in this example ?

D

David Poundall

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
 
S

Sybren Stuvel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top