mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
finish backporting binary literals and new octal literals docs
This commit is contained in:
parent
b5f8208b49
commit
d79af0fc52
2 changed files with 12 additions and 9 deletions
|
@ -605,6 +605,7 @@ Numeric literals
|
|||
single: long integer literal
|
||||
single: floating point literal
|
||||
single: hexadecimal literal
|
||||
single: binary literal
|
||||
single: octal literal
|
||||
single: decimal literal
|
||||
single: imaginary literal
|
||||
|
@ -631,11 +632,12 @@ definitions:
|
|||
longinteger: `integer` ("l" | "L")
|
||||
integer: `decimalinteger` | `octinteger` | `hexinteger` | `bininteger`
|
||||
decimalinteger: `nonzerodigit` `digit`* | "0"
|
||||
octinteger: "0" `octdigit`+
|
||||
octinteger: "0" ("o" | "O") `octdigit`+ | "0" `octdigit`+
|
||||
hexinteger: "0" ("x" | "X") `hexdigit`+
|
||||
bininteger: "0" ("b" | "B") `bindigit`+
|
||||
nonzerodigit: "1"..."9"
|
||||
octdigit: "0"..."7"
|
||||
bindigit: "0" | "1"
|
||||
hexdigit: `digit` | "a"..."f" | "A"..."F"
|
||||
|
||||
Although both lower case ``'l'`` and upper case ``'L'`` are allowed as suffix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue