Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Note that instances of most other types are non-subclassable "by accident". >>> class A(42): pass ... Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: int() takes at most 2 arguments (3 given) >>> class B: ... def __init__(self, *args): pass ... >>> class C(B()): pass ... >>> C <__main__.B object at 0x7fdcfb49aae0> It is okay until we decide that there is a problem, and it that case it would require more general solution. Are there any issues with this in real code? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46642> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com