tonybaloney / perflint

Python Linter for performance anti patterns
MIT License
659 stars 10 forks source link

use-dict-comprehension example #15

Open billou57 opened 2 years ago

billou57 commented 2 years ago

hello

the example provided for use-dict-comprehension documentation leaves me doubtful

tonybaloney commented 2 years ago

Can you elaborate please

billou57 commented 2 years ago

hello

I think you should provide some information regarding performance. perhaps only by repeating the benefit of list comprehensions. otherwise, it seems (imho) only like a personal taste

msztylko commented 2 years ago

This stack overflow provides a good explanation of why it's better to use dict comprehensions.