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

Fix "mutable default values" code samples #69

Closed arusahni closed 9 years ago

arusahni commented 9 years ago

Two minor issues with the "Using a mutable default value as an argument" chapter:

  1. The list variable shouldn't be named "list".
  2. The sentinel value shouldn't be passed into the append function in the second example. It's not incorrect, but this chapter is all about default values.
programmdesign commented 9 years ago

Hi @arusahni. Thanks for the update!