A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-April/110752.html below:

[Python-Dev] python and super

[Python-Dev] python and super [Python-Dev] python and superGreg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 16 01:38:36 CEST 2011
Michael Foord wrote:

> consider the "recently" introduced problem caused by object.__init__
 > not taking arguments. This makes it impossible to use super correctly
 > in various circumstances.
 >
 > ...
 >
> It is impossible to inherit from both C and A and have all parent 
> __init__ methods called correctly. Changing the semantics of super as 
> described would fix this problem.

I don't see how, because auto-super-calling would eventually
end up trying to call object.__init__ with arguments and fail.

You might think to "fix" this by making a special case of
object.__init__ and refraining from calling it. But the same
problem arises in a more general way whenever some class in
the mix has a method with the right name but the wrong
signature, which is likely to happen if you try to mix
classes that weren't designed to be mixed together.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4