diff options
author | Georg Brandl <georg@python.org> | 2011-01-09 08:01:46 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-01-09 08:01:46 (GMT) |
commit | 41d0815a65484aa72c37d09012bee38cfdecf393 (patch) | |
tree | 13ff9b862fb6d801c051701d82c60e5b789ee421 /Doc/reference | |
parent | 1caa644ffea384c3482e3da4cb142a2610d7f470 (diff) | |
download | cpython-41d0815a65484aa72c37d09012bee38cfdecf393.zip cpython-41d0815a65484aa72c37d09012bee38cfdecf393.tar.gz cpython-41d0815a65484aa72c37d09012bee38cfdecf393.tar.bz2 |
Merged revisions 87789-87790 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r87789 | georg.brandl | 2011-01-06 10:23:56 +0100 (Do, 06 Jan 2011) | 1 line
Fix various issues (mostly Python 2 relics) found by Jacques Ducasse.
........
r87790 | georg.brandl | 2011-01-06 10:25:27 +0100 (Do, 06 Jan 2011) | 1 line
Add acks where acks are due.
........
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 11 | ||||
-rw-r--r-- | Doc/reference/executionmodel.rst | 6 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index d1c4c91..4087db1 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -285,12 +285,11 @@ keeping all locals in that frame alive until the next garbage collection occurs. Before an except clause's suite is executed, details about the exception are stored in the :mod:`sys` module and can be access via :func:`sys.exc_info`. -:func:`sys.exc_info` returns a 3-tuple consisting of: ``exc_type``, the -exception class; ``exc_value``, the exception instance; ``exc_traceback``, a -traceback object (see section :ref:`types`) identifying the point in the program -where the exception occurred. :func:`sys.exc_info` values are restored to their -previous values (before the call) when returning from a function that handled an -exception. +:func:`sys.exc_info` returns a 3-tuple consisting of the exception class, the +exception instance and a traceback object (see section :ref:`types`) identifying +the point in the program where the exception occurred. :func:`sys.exc_info` +values are restored to their previous values (before the call) when returning +from a function that handled an exception. .. index:: keyword: else diff --git a/Doc/reference/executionmodel.rst b/Doc/reference/executionmodel.rst index 861163e..d11e741 100644 --- a/Doc/reference/executionmodel.rst +++ b/Doc/reference/executionmodel.rst @@ -141,9 +141,9 @@ weak form of restricted execution. The namespace for a module is automatically created the first time a module is imported. The main module for a script is always called :mod:`__main__`. -The global statement has the same scope as a name binding operation in the same -block. If the nearest enclosing scope for a free variable contains a global -statement, the free variable is treated as a global. +The :keyword:`global` statement has the same scope as a name binding operation +in the same block. If the nearest enclosing scope for a free variable contains +a global statement, the free variable is treated as a global. A class definition is an executable statement that may use and define names. These references follow the normal rules for name resolution. The namespace of |