quantifiedcode / python-anti-patterns

An open collection of Python anti-patterns and worst practices.
https://quantifiedcode.github.io/python-anti-patterns
Other
1.71k stars 249 forks source link

One of the examples uses the 'list' anti-pattern #159

Open Gotoro opened 2 years ago

Gotoro commented 2 years ago

https://docs.quantifiedcode.com/python-anti-patterns/correctness/else_clause_on_loop_without_a_break_statement.html

The method def contains_magic_number(list, magic_number): uses list as one of the parameters, which redefines the default Python list method.