On 08/29/07, Chris Mellon <[EMAIL PROTECTED]> wrote:
> On 8/29/07, Kenneth Love <[EMAIL PROTECTED]> wrote:
>> How do I print the docstring for a class property?
>>
>> [[[ SNIP EXAMPLE ]]]
>>
>> What am I doing wrong?
>>
>
> You're looking at an instance, not at the class. y.x is going through
> the descriptor lookup and is returning the string, so the __doc__ is
> the the __doc__ of the string object, as you see.
>
> If you want to look at the property directly, look it up in the class 
> object:
>
> C.x.__doc__

That worked.  Thanks!

Kenneth 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to