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 alexey-muranov
Recipients VA, alexey-muranov, gvanrossum, ncoghlan, r.david.murray, serhiy.storchaka
Date 2019-05-07.07:45:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557215143.91.0.750973963227.issue32768@roundup.psfhosted.org>
In-reply-to
Content
IMO "overriding" a method with itself should not change the behaviour. So it seems to me that the following is a bug:

        class C:
            def __init__(self, m):
                print(m)

        class D:
            @staticmethod
            def __new__(cls, *args, **kwargs):
                return super(__class__, __class__).__new__(cls, *args, **kwargs)

            def __init__(self, m):
                print(m)

        C(42) # fine
        D(42) # TypeError: object.__new__() takes exactly one argument

Of course such overriding makes little sense in itself, but forbidding it makes even less sense and creates bugs in more complex scenarios.
History
Date User Action Args
2019-05-07 07:45:43alexey-muranovsetrecipients: + alexey-muranov, gvanrossum, ncoghlan, r.david.murray, serhiy.storchaka, VA
2019-05-07 07:45:43alexey-muranovsetmessageid: <1557215143.91.0.750973963227.issue32768@roundup.psfhosted.org>
2019-05-07 07:45:43alexey-muranovlinkissue32768 messages
2019-05-07 07:45:43alexey-muranovcreate