Message265373
Discussion on Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/157649 .
The conclusion is that alternate constructors should return an instance of the subclass, and either call constructor or use pickling machinery for creating an object in correct state.
Pushed the fix for int.from_bytes() and tests. I'll open separate issues for other alternate constructors (for example issue27006 -- for Decimal.from_float()).
Yes, there is similar bug in date.replace(). C implementation doesn't match Python implementation and bypasses the constructor. Please open separate issue for this Eugene. |
|
Date |
User |
Action |
Args |
2016-05-12 07:49:10 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, rhettinger, facundobatista, mark.dickinson, pitrou, vstinner, Arfrever, r.david.murray, eli.bendersky, skrah, ethan.furman, python-dev, eltoder, bru, juggernaut, iyogeshjoshi |
2016-05-12 07:49:10 | serhiy.storchaka | set | messageid: <1463039350.24.0.713797718479.issue23640@psf.upfronthosting.co.za> |
2016-05-12 07:49:10 | serhiy.storchaka | link | issue23640 messages |
2016-05-12 07:49:10 | serhiy.storchaka | create | |
|