Martin Panter added the comment:

The magical no-argument call could also be clarified:

8. Define in the main text what happens when you omit the first argument (the 
subclass) to “super”. At the moment, I think the reader could infer that it is 
the method’s class, but this is only hinted by reading the comment in the 
illustration and Raymond’s external web page. The documentation should also 
clarify how it works, or at least be clear when it is not supported (e.g. one 
method assigned to multiple classes, functions defined outside a class 
definition, decorators that re-create the class, “super” renamed).

9. The no-argument call creates an instance bound to the first argument of the 
method, not an unbound instance. Determining the “self” argument is also 
magical: it does not seem to work with default arguments, variable positional 
arguments, nor keyword-only arguments. List comprehensions, generator 
expressions, etc seem to override it, and the argument is not seen by exec and 
eval.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23674>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to