Closed
Description
The following program prints __main__.A[int]
even though A
is not generic. I'd expect it to print something like <class '__main__.A'>
.
from typing import Iterator
class A(Iterator[int]):
def __next__(self): pass
print(A().__class__)
Also, this does not generate an exception, even though A
is not generic:
def f(x: A[int]) -> None: pass
Metadata
Metadata
Assignees
Labels
No labels