PEP 622: Sync explanation example; case 0 is now first (#1495)
This commit is contained in:
parent
60a15e8332
commit
058b126e7b
|
@ -242,8 +242,8 @@ a Boolean literal (``True`` or ``False``), or ``None``::
|
||||||
print("Good luck with that...")
|
print("Good luck with that...")
|
||||||
|
|
||||||
Literal pattern uses equality with literal on the right hand side, so that
|
Literal pattern uses equality with literal on the right hand side, so that
|
||||||
in the above example ``number == 1`` and then possibly ``number == 2`` will
|
in the above example ``number == 0`` and then possibly ``number == 1``, etc
|
||||||
be evaluated. Note that although technically negative numbers
|
will be evaluated. Note that although technically negative numbers
|
||||||
are represented using unary minus, they are considered
|
are represented using unary minus, they are considered
|
||||||
literals for the purpose of pattern matching. Unary plus is not allowed.
|
literals for the purpose of pattern matching. Unary plus is not allowed.
|
||||||
Binary plus and minus are allowed only to join a real number and an imaginary
|
Binary plus and minus are allowed only to join a real number and an imaginary
|
||||||
|
|
Loading…
Reference in New Issue