Skip to content

Commit 76433f8

Browse files
[3.11] gh-114070: correct the specification of digit in the float() docs (GH-114080) (#114095)
gh-114070: correct the specification of ``digit`` in the float() docs (GH-114080) (cherry picked from commit 4f24b92) Co-authored-by: Sergey B Kirpichev <[email protected]>
1 parent 3a181a1 commit 76433f8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Doc/library/functions.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -667,16 +667,15 @@ are always available. They are listed here in alphabetical order.
667667
sign: "+" | "-"
668668
infinity: "Infinity" | "inf"
669669
nan: "nan"
670-
digitpart: `!digit` (["_"] `!digit`)*
670+
digit: <a Unicode decimal digit, i.e. characters in Unicode general category Nd>
671+
digitpart: `digit` (["_"] `digit`)*
671672
number: [`digitpart`] "." `digitpart` | `digitpart` ["."]
672673
exponent: ("e" | "E") ["+" | "-"] `digitpart`
673674
floatnumber: number [`exponent`]
674675
floatvalue: [`sign`] (`floatnumber` | `infinity` | `nan`)
675676

676-
Here ``digit`` is a Unicode decimal digit (character in the Unicode general
677-
category ``Nd``). Case is not significant, so, for example, "inf", "Inf",
678-
"INFINITY", and "iNfINity" are all acceptable spellings for positive
679-
infinity.
677+
Case is not significant, so, for example, "inf", "Inf", "INFINITY", and
678+
"iNfINity" are all acceptable spellings for positive infinity.
680679

681680
Otherwise, if the argument is an integer or a floating point number, a
682681
floating point number with the same value (within Python's floating point

0 commit comments

Comments
 (0)