PEP 635: fix duplicate labels (#2742)
This commit is contained in:
parent
b7723057fb
commit
3d63099a52
24
pep-0635.rst
24
pep-0635.rst
|
@ -397,7 +397,7 @@ and not for individual patterns.
|
||||||
return a + [p] + b
|
return a + [p] + b
|
||||||
|
|
||||||
|
|
||||||
.. _patterns:
|
.. _635-patterns:
|
||||||
|
|
||||||
Patterns
|
Patterns
|
||||||
--------
|
--------
|
||||||
|
@ -586,7 +586,7 @@ without adding a significant benefit. It can always be added later.
|
||||||
return expr
|
return expr
|
||||||
|
|
||||||
|
|
||||||
.. _literal_pattern:
|
.. _635-literal_pattern:
|
||||||
|
|
||||||
Literal Patterns
|
Literal Patterns
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
@ -675,7 +675,7 @@ being.
|
||||||
return expr
|
return expr
|
||||||
|
|
||||||
|
|
||||||
.. _capture_pattern:
|
.. _635-capture_pattern:
|
||||||
|
|
||||||
Capture Patterns
|
Capture Patterns
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
@ -734,7 +734,7 @@ especially given that we expect capture patterns to be very common.
|
||||||
return sum(a) / len(a)
|
return sum(a) / len(a)
|
||||||
|
|
||||||
|
|
||||||
.. _wildcard_pattern:
|
.. _635-wildcard_pattern:
|
||||||
|
|
||||||
Wildcard Pattern
|
Wildcard Pattern
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
@ -901,7 +901,7 @@ Allowing users to explicitly specify the grouping is particularly helpful
|
||||||
in case of OR patterns.
|
in case of OR patterns.
|
||||||
|
|
||||||
|
|
||||||
.. _sequence_pattern:
|
.. _635-sequence_pattern:
|
||||||
|
|
||||||
Sequence Patterns
|
Sequence Patterns
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
@ -961,7 +961,7 @@ enumerate all other types that may be used to represent bytes
|
||||||
(e.g. some, but not all, instances of ``memoryview`` and ``array.array``).
|
(e.g. some, but not all, instances of ``memoryview`` and ``array.array``).
|
||||||
|
|
||||||
|
|
||||||
.. _mapping_pattern:
|
.. _635-mapping_pattern:
|
||||||
|
|
||||||
Mapping Patterns
|
Mapping Patterns
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
@ -1008,7 +1008,7 @@ unexpected side effect.
|
||||||
change_red_to_blue(child)
|
change_red_to_blue(child)
|
||||||
|
|
||||||
|
|
||||||
.. _class_pattern:
|
.. _635-class_pattern:
|
||||||
|
|
||||||
Class Patterns
|
Class Patterns
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
@ -1278,13 +1278,3 @@ Copyright
|
||||||
|
|
||||||
This document is placed in the public domain or under the
|
This document is placed in the public domain or under the
|
||||||
CC0-1.0-Universal license, whichever is more permissive.
|
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:
|
|
||||||
|
|
Loading…
Reference in New Issue