summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2014-05-06 14:18:17 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2014-05-06 14:18:17 (GMT)
commit4773b908b129119b081304ef1ef91b0c9a2a5deb (patch)
tree1dda2109c431eff4c7bcffcf2c6c351913407d0d /Doc/reference
parent1512143ef044386916dabfbd6f218ca05df2d943 (diff)
downloadcpython-4773b908b129119b081304ef1ef91b0c9a2a5deb.zip
cpython-4773b908b129119b081304ef1ef91b0c9a2a5deb.tar.gz
cpython-4773b908b129119b081304ef1ef91b0c9a2a5deb.tar.bz2
Add prompts to interactive example.
This makes it match the new example below, and allows Sphinx's "hide the prompts and output" feature to work.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/compound_stmts.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index 5371861..08230fa 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -296,14 +296,14 @@ is executed. If there is a saved exception, it is re-raised at the end of the
exception or executes a :keyword:`return` or :keyword:`break` statement, the
saved exception is discarded::
- def f():
- try:
- 1/0
- finally:
- return 42
-
- >>> f()
- 42
+ >>> def f():
+ ... try:
+ ... 1/0
+ ... finally:
+ ... return 42
+ ...
+ >>> f()
+ 42
The exception information is not available to the program during execution of
the :keyword:`finally` clause.