Alexey Muranov <alexey.mura...@gmail.com> added the comment:
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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32768> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com