diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2014-05-06 14:18:17 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2014-05-06 14:18:17 (GMT) |
commit | 9fafc9f79a0510cd7f7357fcbb8cfffb6f967c6c (patch) | |
tree | d6d39fc033e32c25e96976315722c994e03d0159 /Doc/reference | |
parent | 8edd532026c10816e055b14d5999b6d93540fc6e (diff) | |
download | cpython-9fafc9f79a0510cd7f7357fcbb8cfffb6f967c6c.zip cpython-9fafc9f79a0510cd7f7357fcbb8cfffb6f967c6c.tar.gz cpython-9fafc9f79a0510cd7f7357fcbb8cfffb6f967c6c.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.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 869eef4..5e093cc 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -313,14 +313,14 @@ exception, the saved exception is set as the context of the new exception. If the :keyword:`finally` clause 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. |