Very, very strange problem with properties
Kenneth McDonald
kmmcdonald at wisc.edu
Tue May 4 00:19:23 EDT 2004
Urgh, and that explains why it was working before: I changed my class's
parent class from 'object' to another classic class. Sigh.
Still, I find it kinda strange that the getter worked...
Thanks for the help!
Ken
In article <LHElc.13152$Gq1.3095 at fe2.columbus.rr.com>, Carl Banks wrote:
> Kenneth McDonald wrote:
>>
>>
>> For some reason, properties seem to have stopped working correctly
>> on my system. (Mac OS X 10.3, custom-compiled Python 2.3.3) To the
>> best of my knowledge, they were working correctly at some point
>> in the not-too-distant past. The confusing thing is that they
>> _partly_ work.
>>
>> Consider the following code:
>>
>> class foo:
>
>
> There's your problem. You've defined a classic class. Properties
> only work with new-style classes, so you need to use "class
> foo(object)".
>
>
> suspects-he-will-have-realized-this-2-seconds-after-posting-ly yr's,
>
>
More information about the Python-list
mailing list