Message325976
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 similar behavior):
class Parent():
def __str__(self):
return "Parent"
class Child(Parent):
def foo(self):
s = super(Child, self)
print(s.__str__())
print(str(s))
c = Child()
c.foo()
# Output :
### Parent
### <super: <class 'Child'>, <Child object>> |
|
Date |
User |
Action |
Args |
2018-09-21 08:37:47 | Guillaume Dominici | set | recipients:
+ Guillaume Dominici |
2018-09-21 08:37:47 | Guillaume Dominici | set | messageid: <1537519067.65.0.956365154283.issue34761@psf.upfronthosting.co.za> |
2018-09-21 08:37:47 | Guillaume Dominici | link | issue34761 messages |
2018-09-21 08:37:47 | Guillaume Dominici | create | |
|