Author martin.panter
Recipients Tapani Kiiskinen, docs@python, martin.panter, r.david.murray, rhettinger
Date 2017-04-09.00:16:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491696995.46.0.285442537637.issue23674@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-04-09 00:16:35martin.pantersetrecipients: + martin.panter, rhettinger, r.david.murray, docs@python, Tapani Kiiskinen
2017-04-09 00:16:35martin.pantersetmessageid: <1491696995.46.0.285442537637.issue23674@psf.upfronthosting.co.za>
2017-04-09 00:16:35martin.panterlinkissue23674 messages
2017-04-09 00:16:33martin.pantercreate