mirror of
https://github.com/python/cpython
synced 2024-09-18 21:11:40 +00:00
GH-97950: Use new-style index directive ('keyword') (#104153)
* Uncomment keyword removal in pairindextypes * Use new-style index directive ('keyword') - Reference
This commit is contained in:
parent
d0122372f2
commit
33ca322c50
|
@ -85,8 +85,8 @@ The :keyword:`!if` statement
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
! statement: if
|
! statement: if
|
||||||
keyword: elif
|
pair: keyword; elif
|
||||||
keyword: else
|
pair: keyword; else
|
||||||
single: : (colon); compound statement
|
single: : (colon); compound statement
|
||||||
|
|
||||||
The :keyword:`if` statement is used for conditional execution:
|
The :keyword:`if` statement is used for conditional execution:
|
||||||
|
@ -110,7 +110,7 @@ The :keyword:`!while` statement
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
! statement: while
|
! statement: while
|
||||||
keyword: else
|
pair: keyword; else
|
||||||
pair: loop; statement
|
pair: loop; statement
|
||||||
single: : (colon); compound statement
|
single: : (colon); compound statement
|
||||||
|
|
||||||
|
@ -143,8 +143,8 @@ The :keyword:`!for` statement
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
! statement: for
|
! statement: for
|
||||||
keyword: in
|
pair: keyword; in
|
||||||
keyword: else
|
pair: keyword; else
|
||||||
pair: target; list
|
pair: target; list
|
||||||
pair: loop; statement
|
pair: loop; statement
|
||||||
object: sequence
|
object: sequence
|
||||||
|
@ -206,10 +206,10 @@ The :keyword:`!try` statement
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
! statement: try
|
! statement: try
|
||||||
keyword: except
|
pair: keyword; except
|
||||||
keyword: finally
|
pair: keyword; finally
|
||||||
keyword: else
|
pair: keyword; else
|
||||||
keyword: as
|
pair: keyword; as
|
||||||
single: : (colon); compound statement
|
single: : (colon); compound statement
|
||||||
|
|
||||||
The :keyword:`!try` statement specifies exception handlers and/or cleanup code
|
The :keyword:`!try` statement specifies exception handlers and/or cleanup code
|
||||||
|
@ -326,7 +326,7 @@ stored in the :mod:`sys` module is reset to its previous value::
|
||||||
|
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
keyword: except_star
|
pair: keyword; except_star
|
||||||
|
|
||||||
.. _except_star:
|
.. _except_star:
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ cannot appear in an :keyword:`!except*` clause.
|
||||||
|
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
keyword: else
|
pair: keyword; else
|
||||||
statement: return
|
statement: return
|
||||||
statement: break
|
statement: break
|
||||||
statement: continue
|
statement: continue
|
||||||
|
@ -404,7 +404,7 @@ the :keyword:`!else` clause are not handled by the preceding :keyword:`except`
|
||||||
clauses.
|
clauses.
|
||||||
|
|
||||||
|
|
||||||
.. index:: keyword: finally
|
.. index:: pair: keyword; finally
|
||||||
|
|
||||||
.. _finally:
|
.. _finally:
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ The :keyword:`!with` statement
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
! statement: with
|
! statement: with
|
||||||
keyword: as
|
pair: keyword; as
|
||||||
single: as; with statement
|
single: as; with statement
|
||||||
single: , (comma); with statement
|
single: , (comma); with statement
|
||||||
single: : (colon); compound statement
|
single: : (colon); compound statement
|
||||||
|
@ -586,10 +586,10 @@ The :keyword:`!match` statement
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
! statement: match
|
! statement: match
|
||||||
! keyword: case
|
! pair: keyword; case
|
||||||
! single: pattern matching
|
! single: pattern matching
|
||||||
keyword: if
|
pair: keyword; if
|
||||||
keyword: as
|
pair: keyword; as
|
||||||
pair: match; case
|
pair: match; case
|
||||||
single: as; match statement
|
single: as; match statement
|
||||||
single: : (colon); compound statement
|
single: : (colon); compound statement
|
||||||
|
@ -1474,8 +1474,8 @@ Coroutine function definition
|
||||||
: ["->" `expression`] ":" `suite`
|
: ["->" `expression`] ":" `suite`
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
keyword: async
|
pair: keyword; async
|
||||||
keyword: await
|
pair: keyword; await
|
||||||
|
|
||||||
Execution of Python coroutines can be suspended and resumed at many points
|
Execution of Python coroutines can be suspended and resumed at many points
|
||||||
(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` and
|
(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` and
|
||||||
|
|
|
@ -415,8 +415,8 @@ Yield expressions
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
keyword: yield
|
pair: keyword; yield
|
||||||
keyword: from
|
pair: keyword; from
|
||||||
pair: yield; expression
|
pair: yield; expression
|
||||||
pair: generator; function
|
pair: generator; function
|
||||||
|
|
||||||
|
@ -1149,7 +1149,7 @@ a class instance:
|
||||||
if that method was called.
|
if that method was called.
|
||||||
|
|
||||||
|
|
||||||
.. index:: keyword: await
|
.. index:: pair: keyword; await
|
||||||
.. _await:
|
.. _await:
|
||||||
|
|
||||||
Await expression
|
Await expression
|
||||||
|
|
|
@ -495,7 +495,7 @@ If an expression list is present, it is evaluated, else ``None`` is substituted.
|
||||||
:keyword:`return` leaves the current function call with the expression list (or
|
:keyword:`return` leaves the current function call with the expression list (or
|
||||||
``None``) as return value.
|
``None``) as return value.
|
||||||
|
|
||||||
.. index:: keyword: finally
|
.. index:: pair: keyword; finally
|
||||||
|
|
||||||
When :keyword:`return` passes control out of a :keyword:`try` statement with a
|
When :keyword:`return` passes control out of a :keyword:`try` statement with a
|
||||||
:keyword:`finally` clause, that :keyword:`!finally` clause is executed before
|
:keyword:`finally` clause, that :keyword:`!finally` clause is executed before
|
||||||
|
@ -679,7 +679,7 @@ The :keyword:`!break` statement
|
||||||
:keyword:`while` loop, but not nested in a function or class definition within
|
:keyword:`while` loop, but not nested in a function or class definition within
|
||||||
that loop.
|
that loop.
|
||||||
|
|
||||||
.. index:: keyword: else
|
.. index:: pair: keyword; else
|
||||||
pair: loop control; target
|
pair: loop control; target
|
||||||
|
|
||||||
It terminates the nearest enclosing loop, skipping the optional :keyword:`!else`
|
It terminates the nearest enclosing loop, skipping the optional :keyword:`!else`
|
||||||
|
@ -688,7 +688,7 @@ clause if the loop has one.
|
||||||
If a :keyword:`for` loop is terminated by :keyword:`break`, the loop control
|
If a :keyword:`for` loop is terminated by :keyword:`break`, the loop control
|
||||||
target keeps its current value.
|
target keeps its current value.
|
||||||
|
|
||||||
.. index:: keyword: finally
|
.. index:: pair: keyword; finally
|
||||||
|
|
||||||
When :keyword:`break` passes control out of a :keyword:`try` statement with a
|
When :keyword:`break` passes control out of a :keyword:`try` statement with a
|
||||||
:keyword:`finally` clause, that :keyword:`!finally` clause is executed before
|
:keyword:`finally` clause, that :keyword:`!finally` clause is executed before
|
||||||
|
@ -705,7 +705,7 @@ The :keyword:`!continue` statement
|
||||||
statement: for
|
statement: for
|
||||||
statement: while
|
statement: while
|
||||||
pair: loop; statement
|
pair: loop; statement
|
||||||
keyword: finally
|
pair: keyword; finally
|
||||||
|
|
||||||
.. productionlist:: python-grammar
|
.. productionlist:: python-grammar
|
||||||
continue_stmt: "continue"
|
continue_stmt: "continue"
|
||||||
|
@ -729,8 +729,8 @@ The :keyword:`!import` statement
|
||||||
! statement: import
|
! statement: import
|
||||||
single: module; importing
|
single: module; importing
|
||||||
pair: name; binding
|
pair: name; binding
|
||||||
keyword: from
|
pair: keyword; from
|
||||||
keyword: as
|
pair: keyword; as
|
||||||
exception: ImportError
|
exception: ImportError
|
||||||
single: , (comma); import statement
|
single: , (comma); import statement
|
||||||
|
|
||||||
|
|
|
@ -690,7 +690,7 @@ def patch_pairindextypes(app) -> None:
|
||||||
# exist, by deleting them when using the gettext builder.
|
# exist, by deleting them when using the gettext builder.
|
||||||
|
|
||||||
pairindextypes.pop('module', None)
|
pairindextypes.pop('module', None)
|
||||||
# pairindextypes.pop('keyword', None)
|
pairindextypes.pop('keyword', None)
|
||||||
# pairindextypes.pop('operator', None)
|
# pairindextypes.pop('operator', None)
|
||||||
# pairindextypes.pop('object', None)
|
# pairindextypes.pop('object', None)
|
||||||
# pairindextypes.pop('exception', None)
|
# pairindextypes.pop('exception', None)
|
||||||
|
|
Loading…
Reference in a new issue