Skip to content

[question] dictionary _KT typevar and hashability #3884

Closed
@BvB93

Description

@BvB93

Dear all,

I recently noticed that the _KT typevar used in annotating dict has no upper bound specified, yet dictionary keys must (as far as I'm aware) always be hashable.

Is there a reason here as to why _KT is not defined as TypeVar('_KT', bound=Hashable)?

Regards, Bas

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