Message412627
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? |
|
Date |
User |
Action |
Args |
2022-02-06 12:31:53 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, JelleZijlstra, sobolevn, kj, AlexWaygood, GBeauregard |
2022-02-06 12:31:53 | serhiy.storchaka | set | messageid: <1644150713.08.0.743261810917.issue46642@roundup.psfhosted.org> |
2022-02-06 12:31:53 | serhiy.storchaka | link | issue46642 messages |
2022-02-06 12:31:53 | serhiy.storchaka | create | |
|