Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/writing/gotchas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Python's treatment of mutable default arguments in function definitions.
What You Wrote
~~~~~~~~~~~~~~

.. testcode::
.. code-block:: python

def append_to(element, to=[]):
to.append(element)
Expand All @@ -32,7 +32,7 @@ What You Wrote
What You Might Have Expected to Happen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. testcode::
.. code-block:: python

my_list = append_to(12)
print my_list
Expand Down