mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
Adding a reminder for preventing a misuse of the example in "common gotchas/mutable default arguments"
This commit is contained in:
@@ -76,6 +76,7 @@ signal that no argument was provided (:py:data:`None` is often a good choice).
|
||||
to.append(element)
|
||||
return to
|
||||
|
||||
Do not forget, you are passing a *list* object as the second argument.
|
||||
|
||||
When the Gotcha Isn't a Gotcha
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user