fix minor typos (#294)
This commit is contained in:
parent
3433417193
commit
b61bb7d343
|
@ -466,7 +466,7 @@ Avoid extraneous whitespace in the following situations:
|
||||||
Yes: spam(ham[1], {eggs: 2})
|
Yes: spam(ham[1], {eggs: 2})
|
||||||
No: spam( ham[ 1 ], { eggs: 2 } )
|
No: spam( ham[ 1 ], { eggs: 2 } )
|
||||||
|
|
||||||
- Between a trailing comma and a following close parentheses. ::
|
- Between a trailing comma and a following close parenthesis. ::
|
||||||
|
|
||||||
Yes: foo = (0,)
|
Yes: foo = (0,)
|
||||||
No: bar = (0, )
|
No: bar = (0, )
|
||||||
|
|
|
@ -328,7 +328,7 @@ Some analysis are as follows:
|
||||||
|
|
||||||
- The ``.op`` form is ambiguous: ``1.+a`` would be different from ``1 .+a``.
|
- The ``.op`` form is ambiguous: ``1.+a`` would be different from ``1 .+a``.
|
||||||
- The bracket type operators are most favorable when standing alone, but
|
- The bracket type operators are most favorable when standing alone, but
|
||||||
not in formulas, as they interfere with visual parsing of parenthesis for
|
not in formulas, as they interfere with visual parsing of parentheses for
|
||||||
precedence and function argument. This is so for ``(op)`` and ``[op]``, and
|
precedence and function argument. This is so for ``(op)`` and ``[op]``, and
|
||||||
somewhat less so for ``{op}`` and ``<op>``.
|
somewhat less so for ``{op}`` and ``<op>``.
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ Alternatives
|
||||||
|
|
||||||
<condition> then <expression1> else <expression2>
|
<condition> then <expression1> else <expression2>
|
||||||
|
|
||||||
The advantages are simple visual parsing, no required parenthesis,
|
The advantages are simple visual parsing, no required parentheses,
|
||||||
no change in the semantics of existing keywords, not as likely
|
no change in the semantics of existing keywords, not as likely
|
||||||
as the proposal to be confused with statement syntax, and does
|
as the proposal to be confused with statement syntax, and does
|
||||||
not further overload the colon. The disadvantage is the
|
not further overload the colon. The disadvantage is the
|
||||||
|
|
|
@ -350,7 +350,7 @@ value in the generated C code. Few default values are permitted,
|
||||||
owing to this manual translation step.
|
owing to this manual translation step.
|
||||||
|
|
||||||
If this were a Python function declaration, a parameter declaration
|
If this were a Python function declaration, a parameter declaration
|
||||||
would be delimited by either a trailing comma or an ending parentheses.
|
would be delimited by either a trailing comma or an ending parenthesis.
|
||||||
However, Argument Clinic uses neither; parameter declarations are
|
However, Argument Clinic uses neither; parameter declarations are
|
||||||
delimited by a newline. A trailing comma or right parenthesis is not
|
delimited by a newline. A trailing comma or right parenthesis is not
|
||||||
permitted.
|
permitted.
|
||||||
|
|
|
@ -649,7 +649,7 @@ Lambdas inside expressions
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Because lambdas use the ``':'`` character, they cannot appear outside
|
Because lambdas use the ``':'`` character, they cannot appear outside
|
||||||
of parenthesis in an expression. The colon is interpreted as the start
|
of parentheses in an expression. The colon is interpreted as the start
|
||||||
of the format specifier, which means the start of the lambda
|
of the format specifier, which means the start of the lambda
|
||||||
expression is seen and is syntactically invalid. As there's no
|
expression is seen and is syntactically invalid. As there's no
|
||||||
practical use for a plain lambda in an f-string expression, this is
|
practical use for a plain lambda in an f-string expression, this is
|
||||||
|
|
Loading…
Reference in New Issue