Times where one would use new style classes vs classic classes

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Thu Jul 3 09:11:45 CEST 2008

Quek a écrit :
> Hi all,
> I'm really new to Python and I've been reading up some texts on older
> versions of Python (2.2 to be specific).
> The text briefly mentioned new style and classic classes.
> I'd really like to know in the current context of Python 2.5, besides
> in the cases of multi-inheritance, where would I use new style
> classes?

Everywhere you don't have to support compat with ages-old versions of 
Python. MI is not the main point of newstyle classes (FWIW, you can do 
MI with old-style classes too), they have quite a lot more to offer. 
Consider "classic" classes as a legacy feature, period.

More information about the Python-list mailing list