Skip to content

operator.itemgetter can accept any hashable type #558

@berdario

Description

@berdario

python/mypy#2153

basically, the following is valid Python code:

>>> itemgetter(Ellipsis)({Ellipsis: -1})
-1

in my case I got the error message with a more mundane string key, thus yielding this error:

 No overload variant of "itemgetter" matches argument types [builtins.str]

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