Skip to content

(PYL-R1721) Unnecessary use of comprehension #2

Description

@ab-anand

Description

It is unnecessary to use a comprehension just to loop over the iterable and create a list/set/dict out of it. Python has a specialized set of tools for this task: the list/set/dict constructors, which are faster and more readable. Not Preferred: ```python states = [ ('AL', 'Alabama'), ('AK', 'Alaska'), ('AZ', …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/ab-anand/Filezen/issue/PYL-R1721/occurrences/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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