Message263580
I believe the correct behavior is actually
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "bar.py", line 7, in <module>
C()
TypeError: foo.A.__new__(C) is not safe, use foo.B.__new__()
This is because A comes before B in the mro, and, indeed, constructing C with A.__new__ is unsafe. In fact, reordering A and B in the definition of C fixes everything. |
|
Date |
User |
Action |
Args |
2016-04-16 19:17:39 | benjamin.peterson | set | recipients:
+ benjamin.peterson, twouters, python-dev, bkabrda, eryksun, uosiu, jcristau |
2016-04-16 19:17:39 | benjamin.peterson | set | messageid: <1460834259.17.0.511393680512.issue25731@psf.upfronthosting.co.za> |
2016-04-16 19:17:39 | benjamin.peterson | link | issue25731 messages |
2016-04-16 19:17:39 | benjamin.peterson | create | |
|