From: Zachary Ware Date: Tue, 6 May 2014 14:18:17 +0000 (-0500) Subject: Add prompts to interactive example. X-Git-Tag: v3.5.0a1~1727^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fafc9f79a0510cd7f7357fcbb8cfffb6f967c6c;p=python 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. --- 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.