Very, very strange problem with properties

Carl Banks imbosol at aerojockey.invalid
Tue May 4 00:09:15 EDT 2004


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,


-- 
CARL BANKS                      http://www.aerojockey.com/software
"If you believe in yourself, drink your school, stay on drugs, and
don't do milk, you can get work." 
          -- Parody of Mr. T from a Robert Smigel Cartoon



More information about the Python-list mailing list