Skip to content

Why are the type parameters set, frozenset, dict and frozendict are generic in unbounded? #15751

@jonathandung

Description

@jonathandung

Excuse me if this question may come across as stupid, but these hashed containers should only have hashable items. However, in builtins.pyi, I see that their type variables do not have an upper bound of collections.abc.Hashable. How is that so?

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