[issue34761] str(super()) != super().__str__()
Serhiy Storchaka
report at bugs.python.org
Fri Sep 21 05:14:09 EDT 2018
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
It is an expected behavior.
>From https://docs.python.org/3/library/functions.html#super:
Return a proxy object that delegates method calls to a parent or sibling class of type.
super() delegates explicit method calls. You shouldn't expect that it will delegate special methods called indirectly. For example, super() + 2 doesn't call super().__add__(2), and float(super()) doesn't call super().__float__().
----------
nosy: +rhettinger, serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34761>
_______________________________________
More information about the Python-bugs-list
mailing list