why are people still using classic classes?

John Roth newsgroups at jhrothjr.com
Wed Jan 12 23:03:55 EST 2005


"Simon Wittber" <simonwittber at gmail.com> wrote in message 
news:mailman.605.1105586518.22381.python-list at python.org...
> I've noticed that a few ASPN cookbook recipes, which are recent
> additions, use classic classes.
>
> I've also noticed classic classes are used in many places in the
> standard library.
>
> I've been using new-style classes since Python 2.2, and am suprised
> people are still using the classic classes.
>
> Is there a legitimate use for classic classes that I am not aware of?
> Is there a project to specifically migrate standard library classes to
> new-style classes?

Part of it is simply that it's a bit easier: you don't have to
inherit from object.

AFAIK, there's no project to migrate the standard library, and I'm
not at all sure that would be a good idea since existing programs
that asssume classic class behavior would be affected when
classes they inherited from suddenly changed.

Classic classes will go away sometime in the future, currently
planned for the semi-mythical 3.0 release.

John Roth
>
> Sw. 




More information about the Python-list mailing list