[issue46175] Zero argument super() does not function properly inside generator expressions
Carlos Damazio
report at bugs.python.org
Sun Dec 26 08:13:01 EST 2021
Carlos Damazio <carlos.damazio at damazio.dev> added the comment:
Normally, users assume it's safe to use `super` without explicit arguments, until an undefined behavior happens, such as now. The only thing that glances into this issue is the observation in the docs you've provided that omitting the second argument (self), `super` returns an unbounded object, which is a super object.
I mean, there are 2 alternatives: this issue is related to a lower level implementation and it's another way to solve it (of which needs investigation of course) or state that it's required to provide such arguments in the docs.
https://docs.python.org/3.9/library/functions.html#super
In the newer docs, we are assuming that `super()` is the same as `super(cls, self)`, but clearly it's not.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46175>
_______________________________________
More information about the Python-bugs-list
mailing list