Times where one would use new style classes vs classic classes

Daniel Fetchinson fetchinson at googlemail.com
Thu Jul 3 00:15:55 EDT 2008


> 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? Is it a norm to use more new style classes even if I don't
> have multi-inheritance in the industry, open source projects, etc
> today?
>
> If this isn't the right place to ask these questions, could some one
> point me somewhere more appropriate?

As a general rule one always uses new style classes. In fact, in
python 3.0 old style classes will cease to exist which fact alone
justifies their abandonment from 2.x code too.

Cheers,
Daniel
-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list