Serhiy Storchaka <[email protected]> added the comment:
It is not special for Generic, but happens with every type implementing __new__.
class A:
def __new__(cls, a=1, *args, **kwargs):
return object.__new__(cls)
class B(A):
def __init__(self, b):
pass
import inspect
print(inspect.signature(B))
The above example prints "(a=1, *args, **kwargs)" instead of "(b)".
----------
nosy: +serhiy.storchaka, yselivanov
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40897>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com