Enforce using .setdefault()
#1085
Labels
help wanted
Extra attention is needed
level:starter
Good for newcomers
rule request
Adding a new rule
Milestone
Rule request
Thesis
One can write this code:
But, it is an anti-pattern. Instead one should write:
Related: https://docs.quantifiedcode.com/python-anti-patterns/correctness/not_using_setdefault_to_initialize_a_dictionary.html
This is a refactoring rule.
The text was updated successfully, but these errors were encountered: