Understanding properties
merman
merman at snafu.de
Sat Jul 6 14:05:18 EDT 2002
More information about the Python-list mailing list
Sat Jul 6 14:05:18 EDT 2002
- Previous message (by thread): Using Python for processing of large datasets (convincing managment)
- Next message (by thread): Understanding properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> >> class MyObject(object): > > > > Why it needs the inheritance from object - I don't understand. > > Backwards compatibility. To be precise, a class using properties > needs to be new-style -- subclassing object is the simplest way > to achieve this (there are quite a few others) -- because by > default a class is a "classic" one, implementing exactly the > same semantics as in Python 2.1 and older, ensuring no major code > breakage in porting from 2.1 to 2.2 but constraining the applicability > of the new features to classic classes. Thanks Alex. The last part of your description is a little bit unclear for me - I'm a newbie. Perhaps I will understand it in one year ;-). Regards Thomas
- Previous message (by thread): Using Python for processing of large datasets (convincing managment)
- Next message (by thread): Understanding properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list