@@ -433,6 +433,7 @@ Range Patterns
433
433
RangePattern ::=
434
434
HalfOpenRangePattern
435
435
| InclusiveRangePattern
436
+ | ExclusiveRangePattern
436
437
| ObsoleteRangePattern
437
438
438
439
HalfOpenRangePattern ::=
@@ -441,6 +442,9 @@ Range Patterns
441
442
InclusiveRangePattern ::=
442
443
RangePatternLowBound $$..=$$ RangePatternHighBound
443
444
445
+ ExclusiveRangePattern ::=
446
+ RangePatternLowBound $$..$$ RangePatternHighBound
447
+
444
448
ObsoleteRangePattern ::=
445
449
RangePatternLowBound $$...$$ RangePatternHighBound
446
450
@@ -471,6 +475,10 @@ A :t:`half-open range pattern` is a :t:`range pattern` with only a
471
475
An :t: `inclusive range pattern ` is a :t: `range pattern ` with both a
472
476
:t: `range pattern low bound ` and a :t: `range pattern high bound `.
473
477
478
+ :dp: `fls_3PyquOKjA7SI `
479
+ An :t: `exclusive range pattern ` is a :t: `range pattern ` with both a
480
+ :t: `range pattern low bound ` and a :t: `range pattern high bound `.
481
+
474
482
:dp: `fls_akf9x5r6e0ta `
475
483
An :t: `obsolete range pattern ` is a :t: `range pattern ` that uses obsolete syntax
476
484
to express an :t: `inclusive range pattern `.
@@ -494,6 +502,10 @@ when the context is a :t:`slice pattern`.
494
502
The :t: `range pattern low bound ` of an :t: `inclusive range pattern ` shall be
495
503
less than or equal to its :t: `range pattern high bound `.
496
504
505
+ :dp: `fls_8bdOqkO1NuJW `
506
+ The :t: `range pattern low bound ` of an :t: `exclusive range pattern ` shall be
507
+ less than to its :t: `range pattern high bound `.
508
+
497
509
:dp: `fls_s2b5n4snc4d7 `
498
510
An :t: `obsolete range pattern ` is equivalent to an :t: `inclusive range pattern `.
499
511
@@ -508,11 +520,11 @@ The :t:`[type]s` of the :t:`range pattern low bound` and the
508
520
:dp: `fls_3js1645tgh31 `
509
521
The :t: `type ` of a :t: `range pattern ` is determined as follows:
510
522
511
- * :dp: `fls_wfqrbwrogjnq `
512
- If the :t: `range pattern ` is expressed as an :t: `inclusive range pattern ` or
513
- an :t: `obsolete range pattern `, then the :t: `type ` is the :t: ` unified type ` of
514
- the :t: `[ type]s ` of the :t: `range pattern low bound ` and the
515
- :t: `range pattern high bound `.
523
+ * :dp: `fls_8Q6NfRx4j5V7 `
524
+ If the :t: `range pattern ` is expressed as an :t: `inclusive range pattern `, an
525
+ :t: `exclusive range pattern `, or an :t: `obsolete range pattern `, then the
526
+ :t: `type ` is the :t: `unified type ` of the :t: ` [type]s ` of the
527
+ :t: `range pattern low bound ` and the :t: ` range pattern high bound `.
516
528
517
529
* :dp: `fls_rgr7t33s0m7m `
518
530
Otherwise the :t: `type ` is the :t: `type ` of the :t: `range pattern low bound `.
@@ -1423,6 +1435,12 @@ Range Pattern Matching
1423
1435
the inclusive range from the :t: `range pattern low bound ` to the
1424
1436
:t: `range pattern high bound `, then matching succeeds.
1425
1437
1438
+ #. :dp: `fls_EDL1Pi56KQ2H `
1439
+ If the :t: `range pattern ` is expressed as an :t: `exclusive range pattern `
1440
+ and the context :t: `value ` is in the exclusive range from the
1441
+ :t: `range pattern low bound ` to the :t: `range pattern high bound `, then
1442
+ matching succeeds.
1443
+
1426
1444
#. :dp: `fls_n4t3xah1pk7i `
1427
1445
Otherwise matching fails.
1428
1446
0 commit comments