diff options
| author | Zachary Ware <zachary.ware@gmail.com> | 2014-05-06 09:18:17 -0500 |
|---|---|---|
| committer | Zachary Ware <zachary.ware@gmail.com> | 2014-05-06 09:18:17 -0500 |
| commit | deb3c89b0ea5da8da9df490f9abff2c54a0aeef6 (patch) | |
| tree | 5b5b30881c4523a307a9babfb8692bae7788086c | |
| parent | c2ee5d6de7d010978fd8f35e9d71d2feb841552a (diff) | |
| download | cpython-deb3c89b0ea5da8da9df490f9abff2c54a0aeef6.tar.gz | |
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.
| -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 869eef4924..5e093cc993 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. |
