Python Anti-Patterns
  • Correctness
  • Maintainability
  • Readability
    • Asking for permission instead of forgiveness
    • Comparing things to None the wrong way
    • Comparing things to True the wrong way
    • Using type() to compare types
    • Not using dict comprehensions
    • Not using dict keys when formatting strings
    • Not using items() to iterate over a dictionary
    • Not using named tuples when returning more than one value from a function
    • Not using unpacking for updating multiple values at once
    • Not using zip() to iterate over a pair of lists
    • Putting type information in a variable name
    • Test for object identity should be is
    • Using an unpythonic loop
    • Using map() or filter() where list comprehension is possible
    • Using CamelCase in function names
  • Security
  • Performance
  • Django
 
Python Anti-Patterns
  • Documentation »
  • Readability
  • View page source

ReadabilityΒΆ

  • Asking for permission instead of forgiveness
  • Comparing things to None the wrong way
  • Comparing things to True the wrong way
  • Using type() to compare types
  • Not using dict comprehensions
  • Not using dict keys when formatting strings
  • Not using items() to iterate over a dictionary
  • Not using named tuples when returning more than one value from a function
  • Not using unpacking for updating multiple values at once
  • Not using zip() to iterate over a pair of lists
  • Putting type information in a variable name
  • Test for object identity should be is
  • Using an unpythonic loop
  • Using map() or filter() where list comprehension is possible
  • Using CamelCase in function names
Next Previous

Sphinx theme provided by Read the Docs - Last updated: Sep 29, 2020