Skip to content

PEP 634: Fix duplicate labels #2735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 10 additions & 20 deletions pep-0634.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ introduction to the concepts, syntax and semantics of patterns.
Syntax and Semantics
====================

See `Appendix A`_ for the complete grammar.
See :ref:`Appendix A <634-appendix-a>` for the complete grammar.

Overview and Terminology
------------------------
Expand Down Expand Up @@ -134,7 +134,7 @@ The precise pattern binding rules vary per pattern type and are
specified below.


.. _guards:
.. _634-guards:

Guards
^^^^^^
Expand Down Expand Up @@ -169,7 +169,7 @@ A match statement may have at most one irrefutable case block, and it
must be last.


.. _patterns:
.. _634-patterns:

Patterns
--------
Expand Down Expand Up @@ -225,7 +225,7 @@ until one succeeds. The OR pattern is then deemed to succeed.
If none of the subpatterns succeed the OR pattern fails.


.. _literal_pattern:
.. _634-literal_pattern:

Literal Patterns
^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -261,7 +261,7 @@ value expressed by the literal, using the following comparisons rules:
using the ``is`` operator.


.. _capture_pattern:
.. _634-capture_pattern:

Capture Patterns
^^^^^^^^^^^^^^^^
Expand All @@ -284,7 +284,7 @@ disallows for example ``case x, x: ...`` but allows ``case [x] | x:
...``.


.. _wildcard_pattern:
.. _634-wildcard_pattern:

Wildcard Pattern
^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -331,7 +331,7 @@ A parenthesized pattern has no additional syntax. It allows users to
add parentheses around patterns to emphasize the intended grouping.


.. _sequence_pattern:
.. _634-sequence_pattern:

Sequence Patterns
^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -411,7 +411,7 @@ then matched to the corresponding subject items, as for a fixed-length
sequence.


.. _mapping_pattern:
.. _634-mapping_pattern:

Mapping Patterns
^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -466,7 +466,7 @@ with keys that were already present when the match statement was
entered.


.. _class_pattern:
.. _634-class_pattern:

Class Patterns
^^^^^^^^^^^^^^
Expand Down Expand Up @@ -592,7 +592,7 @@ existing standard library classes and adding ``__match_args__`` where
it looks beneficial.


.. _Appendix A:
.. _634-appendix-a:

Appendix A -- Full Grammar
==========================
Expand Down Expand Up @@ -682,13 +682,3 @@ Copyright

This document is placed in the public domain or under the
CC0-1.0-Universal license, whichever is more permissive.


..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End: