Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PYL-R1721) Unnecessary use of comprehension #2

Open
ab-anand opened this issue Sep 24, 2020 · 0 comments
Open

(PYL-R1721) Unnecessary use of comprehension #2

ab-anand opened this issue Sep 24, 2020 · 0 comments

Comments

@ab-anand
Copy link
Owner

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant