Skip to content

Commit

Permalink
PEP 622: Adopt a few clarifications (only) from python#1564
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum authored and mnm678 committed Oct 22, 2020
1 parent 9753205 commit eda76dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pep-0622.rst
Expand Up @@ -1517,8 +1517,8 @@ ambiguous with capture patterns. Five other alternatives were considered:
disambiguate grouping in patterns, e.g. in ``Point(x, y=(y :=
complex()))``.

* Introduce a special symbol, for example ``.``, ``$``, or ``^`` to
indicate that a given name is a constant to be matched against, not
* Introduce a special symbol, for example ``.``, ``?``, ``$``, or ``^`` to
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
leading-dot rule::

Expand Down Expand Up @@ -1554,7 +1554,9 @@ ambiguous with capture patterns. Five other alternatives were considered:
* The authors are not aware of any other language that adorns
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::

Expand Down

0 comments on commit eda76dc

Please sign in to comment.