Skip to content

Describe generic classes as base classes #41

@JukkaL

Description

@JukkaL

The PEP should probably mention what happens if a generic class is used as a base class.

Examples to consider:

class StrList(List[str]): ...  # StrList is not generic

T = TypeVar('T')

class MyList(List[T]): ...   # Mypy requires Generic[T] as a base class, but it's ugly

x = Undefined(MyList[int])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions