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 Dennis Sweeney
Recipients Dennis Sweeney, autospamfighter
Date 2020-11-13.05:36:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605245770.68.0.810728354716.issue42334@roundup.psfhosted.org>
In-reply-to
Content
This is because int, str, and complex are immutable. If I have 

    class MyInt(int):
        def __init__(self, stuff):
            pass

then when I call MyInt("19"), the string "19" is passed to the constructor int.__new__ before the overridden initializer MyInt.__init__. You can only override that by implementing a MyInt.__new__ to override the int constructor.

This is not a bug.
History
Date User Action Args
2020-11-13 05:36:10Dennis Sweeneysetrecipients: + Dennis Sweeney, autospamfighter
2020-11-13 05:36:10Dennis Sweeneysetmessageid: <1605245770.68.0.810728354716.issue42334@roundup.psfhosted.org>
2020-11-13 05:36:10Dennis Sweeneylinkissue42334 messages
2020-11-13 05:36:10Dennis Sweeneycreate