Chris Mellon a écrit : > On 8/29/07, Kenneth Love <[EMAIL PROTECTED]> wrote: > >>How do I print the docstring for a class property? (snip) > 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__
Or type(y).x.__doc__ if you don't know the class of y. -- http://mail.python.org/mailman/listinfo/python-list