property __doc__

D

David Isaac

To access the doc string of a property,
I have to use the class not an instance.
Why?

Thanks,
Alan Isaac
 
R

Robert Kern

David said:
To access the doc string of a property,
I have to use the class not an instance.
Why?

Because getting the attribute from the instance gets the calculated value (the
value returned from the getter function), not the actual property object.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 

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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top