property __doc__

Robert Kern robert.kern at gmail.com
Fri Jun 30 23:48:37 EDT 2006


David Isaac wrote:
> 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




More information about the Python-list mailing list