Immutability

Fredrik Lundh fredrik at pythonware.com
Wed Jun 28 12:14:34 EDT 2006


Bruno Desthuilliers wrote:

>> class fred :
>>     @property
>>     def joe (self) :
>>         print "Inside /joe\n"
>
>
> properties dont work properly on old-style classes (lookup 'new-style
> classes' on python.org, in the documentation menu), hence the strange
> behaviour you observe.

property getters work just fine on old-style classes (setters and deleters don't
work, but that's not what he's using).

</F> 






More information about the Python-list mailing list