Re: User Access to the docstring of a property

2006-10-21 Thread Diez B. Roggisch
Colin J. Williams schrieb: > George, > > Thanks to Dietz and yourself. > > Yes, I should have referenced the class, rather than the instance. > However, for methods, the docstring is revealed for an instance. > > Colin W. > > PS It would help if someone could explain the use of @apply in the

Re: User Access to the docstring of a property

2006-10-21 Thread Colin J. Williams
George, Thanks to Dietz and yourself. Yes, I should have referenced the class, rather than the instance. However, for methods, the docstring is revealed for an instance. Colin W. PS It would help if someone could explain the use of @apply in the example Dietz gave. The documentation gives no

Re: User Access to the docstring of a property

2006-10-20 Thread georgeryoung
Colin J. Williams wrote: > Is there some way that the user can access the docstring specified for a > property? Do keep in mind that the docstring is not guaranteed to be available. If the application is run with optimization turned on, docstrings are usually optimized out. Docstrings are handy

Re: User Access to the docstring of a property

2006-10-20 Thread Diez B. Roggisch
Colin J. Williams schrieb: > Is there some way that the user can access the docstring specified for a > property? You need to access it using the class, not an instance of it. class Foo(object): @apply def prop(): def fget(self): return 10 def fset(self,