Skip to content

Commit 6e0c78d

Browse files
author
monchitos
committed
Adding a reminder for preventing a misuse of the example in "common gotchas/mutable default arguments"
1 parent 83d1fd4 commit 6e0c78d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/writing/gotchas.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ signal that no argument was provided (:py:data:`None` is often a good choice).
7676
to.append(element)
7777
return to
7878
79+
Do not forget, you are passing a *list* object as the second argument.
7980

8081
When the Gotcha Isn't a Gotcha
8182
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)