bpo-35054: Add more index entries for symbols. (GH-10064)

This commit is contained in:
Serhiy Storchaka 2018-10-26 09:00:49 +03:00 committed by GitHub
parent 3ec9af75f6
commit ddb961d2ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 466 additions and 64 deletions

View file

@ -112,6 +112,12 @@ unacceptable. The rules observed by various types and the exceptions raised are
given with the definition of the object types (see section :ref:`types`).
.. index:: triple: target; list; assignment
single: ,; in target list
single: *; in assignment target list
single: [; in assignment target list
single: ]; in assignment target list
single: (; in assignment target list
single: ); in assignment target list
Assignment of an object to a target list, optionally enclosed in parentheses or
square brackets, is recursively defined as follows.
@ -321,6 +327,7 @@ Annotated assignment statements
.. index::
pair: annotated; assignment
single: statement; assignment, annotated
single: :; annotated variable
Annotation assignment is the combination, in a single statement,
of a variable or attribute annotation and an optional assignment statement:
@ -372,6 +379,7 @@ The :keyword:`assert` statement
.. index::
statement: assert
pair: debugging; assertions
single: ,; expression list
Assert statements are a convenient way to insert debugging assertions into a
program:
@ -712,6 +720,9 @@ The :keyword:`import` statement
single: module; importing
pair: name; binding
keyword: from
keyword: as
exception: ImportError
single: ,; import statement
.. productionlist::
import_stmt: "import" `module` ["as" `identifier`] ("," `module` ["as" `identifier`])*
@ -761,8 +772,7 @@ available in the local namespace in one of three ways:
.. index::
pair: name; binding
keyword: from
exception: ImportError
single: from; import statement
The :keyword:`from` form uses a slightly more complex process:
@ -786,6 +796,8 @@ Examples::
from foo.bar import baz # foo.bar.baz imported and bound as baz
from foo import attr # foo imported and foo.attr bound as attr
.. index:: single: *; import statement
If the list of identifiers is replaced by a star (``'*'``), all public
names defined in the module are bound in the local namespace for the scope
where the :keyword:`import` statement occurs.
@ -831,7 +843,9 @@ determine dynamically the modules to be loaded.
Future statements
-----------------
.. index:: pair: future; statement
.. index::
pair: future; statement
single: __future__; future statement
A :dfn:`future statement` is a directive to the compiler that a particular
module should be compiled using syntax or semantics that will be available in a
@ -918,6 +932,7 @@ The :keyword:`global` statement
.. index::
statement: global
triple: global; name; binding
single: ,; identifier list
.. productionlist::
global_stmt: "global" `identifier` ("," `identifier`)*
@ -962,6 +977,7 @@ The :keyword:`nonlocal` statement
=================================
.. index:: statement: nonlocal
single: ,; identifier list
.. productionlist::
nonlocal_stmt: "nonlocal" `identifier` ("," `identifier`)*