From: Terry Jan Reedy Date: Tue, 29 Apr 2014 04:58:56 +0000 (-0400) Subject: Closes 21048: Index 'as' in import and with statements. X-Git-Tag: v3.4.1rc1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7c895edabc0cf1d30061c929ca8c7fc2d45f0851;p=thirdparty%2FPython%2Fcpython.git Closes 21048: Index 'as' in import and with statements. --- diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index e35aa9f74058..4e037113fb7a 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -348,7 +348,9 @@ may be found in section :ref:`raise`. The :keyword:`with` statement ============================= -.. index:: statement: with +.. index:: + statement: with + single: as; with statement The :keyword:`with` statement is used to wrap the execution of a block with methods defined by a context manager (see section :ref:`context-managers`). diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 40bbc391d276..b710cd45860e 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -656,6 +656,8 @@ initializing the module, which includes execution of the module's code. If the requested module is retrieved successfully, it will be made available in the local namespace in one of three ways: +.. index:: single: as; import statement + * If the module name is followed by :keyword:`as`, then the name following :keyword:`as` is bound directly to the imported module. * If no other name is specified, and the module being imported is a top