[issue34761] str(super()) != super().__str__()

2018-09-21 Thread Eric Snow
Eric Snow added the comment: As Serhiy said, this is the correct behavior. Nearly all builtin operations are made using the appropriate "dunder" method from the object's type (not looked up on the object itself). So the following (based on your example) are equivalent: s = super(Child,

[issue34761] str(super()) != super().__str__()

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka 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 wil

[issue34761] str(super()) != super().__str__()

2018-09-21 Thread Guillaume Dominici
New submission from Guillaume Dominici : The super proxy does not seem to forward call to .__str__() when the call occurs via str() function. It may be an expected behavior, but it looks unexpected to me. Minimal reproduction (tested on Python 3.6, but I believe may newer versions have simila