mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
Update gotchas.rst
Previous test block did not show code blocks in markdown view.
This commit is contained in:
@@ -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)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user