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 ppperry
Recipients Vadim Pushtaev, ncoghlan, ppperry, serhiy.storchaka
Date 2018-08-08.19:07:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533755253.45.0.56676864532.issue34362@psf.upfronthosting.co.za>
In-reply-to
Content
If you have a class that defines __new__ to the __new__ of another builtin type that it isn't a subclass of:
>>> class X:
...    __new__ = tuple.__new__
Instantiating this class should produce an error because `tuple.__new__` can't handle non-tuples, but instead it succeeds:
>>> X()
<__main__.X object at 0x00000000032C3F98>

(related: issue34284)
History
Date User Action Args
2018-08-08 19:07:33ppperrysetrecipients: + ppperry, ncoghlan, serhiy.storchaka, Vadim Pushtaev
2018-08-08 19:07:33ppperrysetmessageid: <1533755253.45.0.56676864532.issue34362@psf.upfronthosting.co.za>
2018-08-08 19:07:33ppperrylinkissue34362 messages
2018-08-08 19:07:33ppperrycreate