mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Merge with 3.4
This commit is contained in:
commit
e9dcfd1870
2 changed files with 5 additions and 1 deletions
|
|
@ -348,7 +348,9 @@ may be found in section :ref:`raise`.
|
||||||
The :keyword:`with` statement
|
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
|
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`).
|
methods defined by a context manager (see section :ref:`context-managers`).
|
||||||
|
|
|
||||||
|
|
@ -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
|
If the requested module is retrieved successfully, it will be made
|
||||||
available in the local namespace in one of three ways:
|
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
|
* If the module name is followed by :keyword:`as`, then the name
|
||||||
following :keyword:`as` is bound directly to the imported module.
|
following :keyword:`as` is bound directly to the imported module.
|
||||||
* If no other name is specified, and the module being imported is a top
|
* If no other name is specified, and the module being imported is a top
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue