@@ -35,7 +35,7 @@ introduction to the concepts, syntax and semantics of patterns.
35
35
Syntax and Semantics
36
36
====================
37
37
38
- See `Appendix A `_ for the complete grammar.
38
+ See :ref: `Appendix A < 634-appendix-a >` for the complete grammar.
39
39
40
40
Overview and Terminology
41
41
------------------------
@@ -134,7 +134,7 @@ The precise pattern binding rules vary per pattern type and are
134
134
specified below.
135
135
136
136
137
- .. _ guards :
137
+ .. _ 634-guards :
138
138
139
139
Guards
140
140
^^^^^^
@@ -169,7 +169,7 @@ A match statement may have at most one irrefutable case block, and it
169
169
must be last.
170
170
171
171
172
- .. _ patterns :
172
+ .. _ 634-patterns :
173
173
174
174
Patterns
175
175
--------
@@ -225,7 +225,7 @@ until one succeeds. The OR pattern is then deemed to succeed.
225
225
If none of the subpatterns succeed the OR pattern fails.
226
226
227
227
228
- .. _ literal_pattern :
228
+ .. _ 634-literal_pattern :
229
229
230
230
Literal Patterns
231
231
^^^^^^^^^^^^^^^^
@@ -261,7 +261,7 @@ value expressed by the literal, using the following comparisons rules:
261
261
using the ``is `` operator.
262
262
263
263
264
- .. _ capture_pattern :
264
+ .. _ 634-capture_pattern :
265
265
266
266
Capture Patterns
267
267
^^^^^^^^^^^^^^^^
@@ -284,7 +284,7 @@ disallows for example ``case x, x: ...`` but allows ``case [x] | x:
284
284
... ``.
285
285
286
286
287
- .. _ wildcard_pattern :
287
+ .. _ 634-wildcard_pattern :
288
288
289
289
Wildcard Pattern
290
290
^^^^^^^^^^^^^^^^
@@ -331,7 +331,7 @@ A parenthesized pattern has no additional syntax. It allows users to
331
331
add parentheses around patterns to emphasize the intended grouping.
332
332
333
333
334
- .. _ sequence_pattern :
334
+ .. _ 634-sequence_pattern :
335
335
336
336
Sequence Patterns
337
337
^^^^^^^^^^^^^^^^^
@@ -411,7 +411,7 @@ then matched to the corresponding subject items, as for a fixed-length
411
411
sequence.
412
412
413
413
414
- .. _ mapping_pattern :
414
+ .. _ 634-mapping_pattern :
415
415
416
416
Mapping Patterns
417
417
^^^^^^^^^^^^^^^^
@@ -466,7 +466,7 @@ with keys that were already present when the match statement was
466
466
entered.
467
467
468
468
469
- .. _ class_pattern :
469
+ .. _ 634-class_pattern :
470
470
471
471
Class Patterns
472
472
^^^^^^^^^^^^^^
@@ -592,7 +592,7 @@ existing standard library classes and adding ``__match_args__`` where
592
592
it looks beneficial.
593
593
594
594
595
- .. _ Appendix A :
595
+ .. _ 634-appendix-a :
596
596
597
597
Appendix A -- Full Grammar
598
598
==========================
@@ -682,13 +682,3 @@ Copyright
682
682
683
683
This document is placed in the public domain or under the
684
684
CC0-1.0-Universal license, whichever is more permissive.
685
-
686
-
687
- ..
688
- Local Variables:
689
- mode: indented-text
690
- indent-tabs-mode: nil
691
- sentence-end-double-space: t
692
- fill-column: 70
693
- coding: utf-8
694
- End:
0 commit comments