From cf3b2e1f264b293e34eb5f90dce581a136d20b91 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 28 Jul 2022 14:49:29 +0300 Subject: [PATCH] PEP 634: Fix duplicate labels (#2735) --- pep-0634.rst | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/pep-0634.rst b/pep-0634.rst index 116ce0c82..82b1ebd3c 100644 --- a/pep-0634.rst +++ b/pep-0634.rst @@ -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 ------------------------ @@ -134,7 +134,7 @@ The precise pattern binding rules vary per pattern type and are specified below. -.. _guards: +.. _634-guards: Guards ^^^^^^ @@ -169,7 +169,7 @@ A match statement may have at most one irrefutable case block, and it must be last. -.. _patterns: +.. _634-patterns: Patterns -------- @@ -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 ^^^^^^^^^^^^^^^^ @@ -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 ^^^^^^^^^^^^^^^^ @@ -284,7 +284,7 @@ disallows for example ``case x, x: ...`` but allows ``case [x] | x: ...``. -.. _wildcard_pattern: +.. _634-wildcard_pattern: Wildcard Pattern ^^^^^^^^^^^^^^^^ @@ -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 ^^^^^^^^^^^^^^^^^ @@ -411,7 +411,7 @@ then matched to the corresponding subject items, as for a fixed-length sequence. -.. _mapping_pattern: +.. _634-mapping_pattern: Mapping Patterns ^^^^^^^^^^^^^^^^ @@ -466,7 +466,7 @@ with keys that were already present when the match statement was entered. -.. _class_pattern: +.. _634-class_pattern: Class Patterns ^^^^^^^^^^^^^^ @@ -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 ========================== @@ -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: