Skip to content

consider-dictionary-membership #4069

Closed
@belm0

Description

@belm0

When testing if a key is contained in a dictionary, it's O(1) to use in directly on the dict object as opposed to O(N) through .keys().

So along the lines of consider-iterating-dictionary, there should be a check for this that suggests removing keys().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions