Trying to understand Python objects

Fredrik Lundh fredrik at
Thu Nov 23 21:31:04 CET 2006

Bruno Desthuilliers wrote:

> Don't see it as a religious point please, but I fail to understand why 
> you seem so in love with old-style classes ? new-style classes are the 
> "official" Python object model since 2.2 (which is a few years ago now), 
> and the last mandatory use of them (exceptions...) disappeared with the 
> 2.5. AFAIK, everything you do with old-style classes can be done with 
> new-style ones. FWIW, old-style classes support is now only for backward 
> compat. So *why* insisting on using them ?

to pick a few reasons: the old-style/new-style distinction is com-
pletely irrelevant for people new to the language, attribute access
is slower for new-style classes (!), they'll be default in 3.0 any-


More information about the Python-list mailing list