Setting up properties from the __init__ method

Michael Hudson mwh at python.net
Thu Oct 30 07:08:42 EST 2003


user at domain.invalid writes:

> I have gotten properties to respond correctly, but
> when I try to do it in __init__:
> 
> class foo:

Note in addition to the replies you got, the world of descriptors only
applies in fullness to new-style types -- so 

class foo(object):

would be a better start.

Cheers,
mwh

-- 
  <arigo> something happens, what I'm not exactly sure.
                                                 -- PyPy debugging fun




More information about the Python-list mailing list