Nick Maclaren wrote:

> class fred :
>    @property
>    def joe (self) :
>        print "Inside /joe\n"
>
> a = fred()
> a.joe()
>
> Traceback (most recent call last):
>  File "crap.py", line 14, in <module>
>    a.joe()
> TypeError: 'NoneType' object is not callable
>
> VERY weird - I could understand it if I got the error and DIDN'T succeed
> in the call ....

a property looks like an attribute, not a method, so you're trying to call 
whatever
your "joe()" method returns.

(that's what "a function for getting an attribute value" in the property 
documentation
refers to).

</F> 



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

Reply via email to