diff options
author | Andrés Delfino <adelfino@gmail.com> | 2018-07-07 20:24:46 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-07 20:24:46 (GMT) |
commit | caccca78e46bf3c3b24e09b3afb1c1b08c39990c (patch) | |
tree | a4fe984b0fbc0e9dec2e4c0dba924e56e15d3f97 /Doc/reference/expressions.rst | |
parent | b6bb77c2b8e83ba6cb845c7b512ac564276e854f (diff) | |
download | cpython-caccca78e46bf3c3b24e09b3afb1c1b08c39990c.zip cpython-caccca78e46bf3c3b24e09b3afb1c1b08c39990c.tar.gz cpython-caccca78e46bf3c3b24e09b3afb1c1b08c39990c.tar.bz2 |
bpo-33702: Add some missing links in production lists and do a little polish (GH-7259)
Diffstat (limited to 'Doc/reference/expressions.rst')
-rw-r--r-- | Doc/reference/expressions.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 17f1f2c..33f7575 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -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 |