This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Arfrever, barry, bru, eli.bendersky, eltoder, ethan.furman, facundobatista, iyogeshjoshi, juggernaut, mark.dickinson, pitrou, python-dev, r.david.murray, rhettinger, serhiy.storchaka, skrah, vstinner
Date 2016-05-12.07:49:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463039350.24.0.713797718479.issue23640@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-05-12 07:49:10serhiy.storchakasetrecipients: + 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:10serhiy.storchakasetmessageid: <1463039350.24.0.713797718479.issue23640@psf.upfronthosting.co.za>
2016-05-12 07:49:10serhiy.storchakalinkissue23640 messages
2016-05-12 07:49:10serhiy.storchakacreate