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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com