Why new Python 2.5 feature "class C()" return old-style class ?
Robert Kern
robert.kern at gmail.com
Thu Apr 13 08:18:53 EDT 2006
Petr Prikryl wrote:
> "Aahz" wrote...
>
>>Bruno Desthuilliers wrote:
>>
>>>Aahz a �crit :
>
> [...]
>
>>>>>Please repeat this 101 times each morning:
>>>>>"thou shall not use old-style classes for they are deprecated".
>>>>
>>>>Classic classes are *NOT* deprecated.
>>>
>>>Perhaps not *officially* yet...
>>
>>Not even unofficially. The point at which we have deprecation is when
>>PEP8 gets changed to say that new-style classes are required for
>>contributions.
>
> My question: Could the old classes be treated in
> a new Python treated as new classes with "implicit"
> base object? (I know the Zen... ;-)
>
> Example: I use usually a very simple classes. When I add
> "(object)" to my class definitions, the code continues to
> works fine -- plus I have new features to use.
> Why this cannot be done automatically? What could
> be broken in the old code if it was threated so?
Method resolution order in class hierarchies that have multiple inheritance.
--
Robert Kern
robert.kern at gmail.com
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list