How is it that the Generic class (I'll be using Python 3.7+ PEP-0560), restricts the use of cls as a keyword argument in __init__ ?
This is pretty clear:
>>> from typing import Generic, TypeVar
>>> I = TypeVar("I")
>>> class A(Generic[I]):
... def __init__(self, cls=1):
... pass
...
>>> A(1) # No error
>>> A(cls=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __new__() got multiple values for argument 'cls'
This looks like something specific to Generic. Thanks