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/110791.html below:

[Python-Dev] python and super

[Python-Dev] python and superSteven D'Aprano steve at pearwood.info
Sun Apr 17 03:48:07 CEST 2011
Michael Foord wrote:
> On 15/04/2011 02:23, Steven D'Aprano wrote:
[...]
>> If we treat django's failure to use super as a bug, you want the 
>> Python language to work-around that bug so that:
> 
> What you say (that this particular circumstance could be treated as a 
> bug in django) is true, however 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.

So you say. I don't have an an opinion on whether or not you are 
technically correct, but adding DWIM black-magic to super scares me. It 
scares me even if it were guaranteed to *only* apply to __init__, but if 
it applied to arbitrary methods, it frankly terrifies me.

If it were limited to only apply to __init__, there would be a constant 
stream of requests that we loosen the restriction and "make super just 
work" for all methods, despite the dangers of DWIM code.




-- 
Steven

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