PEP 622: Sync explanation example; case 0 is now first (#1495)

This commit is contained in:
JimJJewett 2020-07-04 17:04:43 -04:00 committed by GitHub
parent 60a15e8332
commit 058b126e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -242,8 +242,8 @@ a Boolean literal (``True`` or ``False``), or ``None``::
print("Good luck with 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
be evaluated. Note that although technically negative numbers
in the above example ``number == 0`` and then possibly ``number == 1``, etc
will be evaluated. Note that although technically negative numbers
are represented using unary minus, they are considered
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