Python 2.2 properties
Thomas Heller
thomas.heller at ion-tof.com
Tue Jan 15 13:28:17 EST 2002
"Oleg Broytmann" <phd at phd.pp.ru> wrote in message news:mailman.1011116966.30282.python-list at python.org...
> On Tue, Jan 15, 2002 at 09:43:56AM -0800, Mark McEahern wrote:
> > "Note, to use property, your class must derive from object."
>
> To use properties properly (pun! pun! :) your class must be new-style
> class, but to create new-style class you don't need to be derived from
> object. You can derive it from any new-style class (int, float, str, list,
> dictionary...)
...because these are derived from object!
>>> int.__bases__
(<type 'object'>,)
>>>
Thomas
More information about the Python-list
mailing list