bpo-33702: Add some missing links in production lists and do a little polish (GH-7259)

This commit is contained in:
Andrés Delfino 2018-07-07 17:24:46 -03:00 committed by Serhiy Storchaka
parent b6bb77c2b8
commit caccca78e4
3 changed files with 25 additions and 25 deletions

View file

@ -1055,7 +1055,7 @@ The power operator binds more tightly than unary operators on its left; it binds
less tightly than unary operators on its right. The syntax is:
.. productionlist::
power: ( `await_expr` | `primary` ) ["**" `u_expr`]
power: (`await_expr` | `primary`) ["**" `u_expr`]
Thus, in an unparenthesized sequence of power and unary operators, the operators
are evaluated from right to left (this does not constrain the evaluation order
@ -1127,7 +1127,7 @@ operators and one for additive operators:
.. productionlist::
m_expr: `u_expr` | `m_expr` "*" `u_expr` | `m_expr` "@" `m_expr` |
: `m_expr` "//" `u_expr`| `m_expr` "/" `u_expr` |
: `m_expr` "//" `u_expr` | `m_expr` "/" `u_expr` |
: `m_expr` "%" `u_expr`
a_expr: `m_expr` | `a_expr` "+" `m_expr` | `a_expr` "-" `m_expr`
@ -1207,7 +1207,7 @@ Shifting operations
The shifting operations have lower priority than the arithmetic operations:
.. productionlist::
shift_expr: `a_expr` | `shift_expr` ( "<<" | ">>" ) `a_expr`
shift_expr: `a_expr` | `shift_expr` ("<<" | ">>") `a_expr`
These operators accept integers as arguments. They shift the first argument to
the left or right by the number of bits given by the second argument.
@ -1267,7 +1267,7 @@ C, expressions like ``a < b < c`` have the interpretation that is conventional
in mathematics:
.. productionlist::
comparison: `or_expr` ( `comp_operator` `or_expr` )*
comparison: `or_expr` (`comp_operator` `or_expr`)*
comp_operator: "<" | ">" | "==" | ">=" | "<=" | "!="
: | "is" ["not"] | ["not"] "in"
@ -1631,9 +1631,9 @@ Expression lists
.. index:: pair: expression; list
.. productionlist::
expression_list: `expression` ( "," `expression` )* [","]
starred_list: `starred_item` ( "," `starred_item` )* [","]
starred_expression: `expression` | ( `starred_item` "," )* [`starred_item`]
expression_list: `expression` ("," `expression`)* [","]
starred_list: `starred_item` ("," `starred_item`)* [","]
starred_expression: `expression` | (`starred_item` ",")* [`starred_item`]
starred_item: `expression` | "*" `or_expr`
.. index:: object: tuple