[issue26391] Specialized sub-classes of Generic never call __init__

2016-03-23 Thread Guido van Rossum
Guido van Rossum added the comment: You've hit a type where PEP 484 and mypy disagree. The PEP shows a few examples of this: https://www.python.org/dev/peps/pep-0484/#instantiating-generic-classes-and-type-erasure However when I feed the examples from the PEP to mypy I get an error on each of

[issue26391] Specialized sub-classes of Generic never call __init__

2016-03-23 Thread SilentGhost
Changes by SilentGhost : -- nosy: +gvanrossum ___ Python tracker ___ ___

[issue26391] Specialized sub-classes of Generic never call __init__

2016-02-19 Thread Kai Wohlfahrt
New submission from Kai Wohlfahrt: A specialized sub-class of a generic type never calls __init__ when it is instantiated. See below for an example: from typing import Generic, TypeVar T = TypeVar('T') class Foo(Generic[T]): def __init__(self, value: T): self.value = value Bar =