Different values for property vs attribute???

Greg Ewing greg at cosc.canterbury.ac.nz
Tue May 4 22:54:37 EDT 2004


Russell Blau wrote:
> As someone else pointed out in another thread within the last 24 hours,
> properties are only supported for new-style classes.  Try changing the first
> line to
> 
> class Klass(object):
> 
> and see if it works.

Since this seems to be such an easy error to make, and
the symptoms are so obscure, is there any way the
interpreter could be made to check for it?

E.g. maybe old-style classes could refuse to accept any
attribute which is an instance of property.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list