[issue42775] __init_subclass__ should be called in __init__
Ethan Furman
report at bugs.python.org
Mon Dec 28 22:15:45 EST 2020
Ethan Furman <ethan at stoneleaf.us> added the comment:
My understanding of using keywords in class headers
class MyClass(SomeBaseClass, setting='maybe'):
...
is that the keywords would get passed into the super classes `__init_subclass__` (`SomeBaseClass` and `setting`).
However, in the cases of
- test_descr.py
- test_py_compile.py
- typing.py
that wasn't happening -- until the initial patch of moving the calls from `type.__new__` to `type.__init__`.
An `__init__` has been added in those three locations to discard the keyword arguments being passed in.
----------
nosy: +rhettinger, stutzbach
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42775>
_______________________________________
More information about the Python-bugs-list
mailing list