PEP 622: Adopt a few clarifications (only) from #1564

This commit is contained in:
Guido van Rossum 2020-08-15 15:34:19 -07:00
parent 724cef768c
commit 55caf0cbe2
1 changed files with 5 additions and 3 deletions

View File

@ -1517,8 +1517,8 @@ ambiguous with capture patterns. Five other alternatives were considered:
disambiguate grouping in patterns, e.g. in ``Point(x, y=(y := disambiguate grouping in patterns, e.g. in ``Point(x, y=(y :=
complex()))``. complex()))``.
* Introduce a special symbol, for example ``.``, ``$``, or ``^`` to * Introduce a special symbol, for example ``.``, ``?``, ``$``, or ``^`` to
indicate that a given name is a constant to be matched against, not indicate that a given name is a value to be matched against, not
to be assigned to. An earlier version of this proposal used a to be assigned to. An earlier version of this proposal used a
leading-dot rule:: leading-dot rule::
@ -1554,7 +1554,9 @@ ambiguous with capture patterns. Five other alternatives were considered:
* The authors are not aware of any other language that adorns * The authors are not aware of any other language that adorns
captures in this way. captures in this way.
* None of the proposed syntaxes have any precedent in Python. * None of the proposed syntaxes have any precedent in Python;
no other place in Python that binds names (e.g. ``import``,
``def``, ``for``) uses special marker syntax.
* It would break the syntactic parallels of the current grammar:: * It would break the syntactic parallels of the current grammar::