Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1696)

Side by Side Diff: Doc/reference/compound_stmts.rst

Issue 15580: fix True/False/None reST markup
Patch Set: Created 9 months, 2 weeks ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/zipimport.rst ('k') | Doc/reference/datamodel.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 .. _compound: 1 .. _compound:
2 2
3 ******************* 3 *******************
4 Compound statements 4 Compound statements
5 ******************* 5 *******************
6 6
7 .. index:: pair: compound; statement 7 .. index:: pair: compound; statement
8 8
9 Compound statements contain (groups of) other statements; they affect or control 9 Compound statements contain (groups of) other statements; they affect or control
10 the execution of those other statements in some way. In general, compound 10 the execution of those other statements in some way. In general, compound
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 The :keyword:`with` statement guarantees that if the :meth:`__enter__` 365 The :keyword:`with` statement guarantees that if the :meth:`__enter__`
366 method returns without an error, then :meth:`__exit__` will always be 366 method returns without an error, then :meth:`__exit__` will always be
367 called. Thus, if an error occurs during the assignment to the target list, 367 called. Thus, if an error occurs during the assignment to the target list,
368 it will be treated the same as an error occurring within the suite would 368 it will be treated the same as an error occurring within the suite would
369 be. See step 6 below. 369 be. See step 6 below.
370 370
371 #. The suite is executed. 371 #. The suite is executed.
372 372
373 #. The context manager's :meth:`__exit__` method is invoked. If an exception 373 #. The context manager's :meth:`__exit__` method is invoked. If an exception
374 caused the suite to be exited, its type, value, and traceback are passed as 374 caused the suite to be exited, its type, value, and traceback are passed as
375 arguments to :meth:`__exit__`. Otherwise, three :const:`None` arguments are 375 arguments to :meth:`__exit__`. Otherwise, three ``None`` arguments are
376 supplied. 376 supplied.
377 377
378 If the suite was exited due to an exception, and the return value from the 378 If the suite was exited due to an exception, and the return value from the
379 :meth:`__exit__` method was false, the exception is reraised. If the return 379 :meth:`__exit__` method was false, the exception is reraised. If the return
380 value was true, the exception is suppressed, and execution continues with the 380 value was true, the exception is suppressed, and execution continues with the
381 statement following the :keyword:`with` statement. 381 statement following the :keyword:`with` statement.
382 382
383 If the suite was exited for any reason other than an exception, the return 383 If the suite was exited for any reason other than an exception, the return
384 value from :meth:`__exit__` is ignored, and execution proceeds at the normal 384 value from :meth:`__exit__` is ignored, and execution proceeds at the normal
385 location for the kind of exit that was taken. 385 location for the kind of exit that was taken.
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 or the execution of a :keyword:`return`, :keyword:`continue`, or 629 or the execution of a :keyword:`return`, :keyword:`continue`, or
630 :keyword:`break` statement. 630 :keyword:`break` statement.
631 631
632 .. [#] A string literal appearing as the first statement in the function body is 632 .. [#] A string literal appearing as the first statement in the function body is
633 transformed into the function's ``__doc__`` attribute and therefore the 633 transformed into the function's ``__doc__`` attribute and therefore the
634 function's :term:`docstring`. 634 function's :term:`docstring`.
635 635
636 .. [#] A string literal appearing as the first statement in the class body is 636 .. [#] A string literal appearing as the first statement in the class body is
637 transformed into the namespace's ``__doc__`` item and therefore the class's 637 transformed into the namespace's ``__doc__`` item and therefore the class's
638 :term:`docstring`. 638 :term:`docstring`.
OLDNEW
« no previous file with comments | « Doc/library/zipimport.rst ('k') | Doc/reference/datamodel.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7