]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-114070: correct the specification of ``digit`` in the float() docs (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 15 Jan 2024 22:26:40 +0000 (23:26 +0100)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2024 22:26:40 +0000 (22:26 +0000)
gh-114070: correct the specification of ``digit`` in the float() docs (GH-114080)
(cherry picked from commit 4f24b92aa0677ed5310dd2d1572b55f4e30c88ef)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Doc/library/functions.rst

index 22e46be9c200f8589fb11758d338a6d4d8a9b7bb..a41a4d225baa6106f6c21f467dfbc63ac423aaab 100644 (file)
@@ -667,16 +667,15 @@ are always available.  They are listed here in alphabetical order.
       sign: "+" | "-"
       infinity: "Infinity" | "inf"
       nan: "nan"
-      digitpart: `!digit` (["_"] `!digit`)*
+      digit: <a Unicode decimal digit, i.e. characters in Unicode general category Nd>
+      digitpart: `digit` (["_"] `digit`)*
       number: [`digitpart`] "." `digitpart` | `digitpart` ["."]
       exponent: ("e" | "E") ["+" | "-"] `digitpart`
       floatnumber: number [`exponent`]
       floatvalue: [`sign`] (`floatnumber` | `infinity` | `nan`)
 
-   Here ``digit`` is a Unicode decimal digit (character in the Unicode general
-   category ``Nd``). Case is not significant, so, for example, "inf", "Inf",
-   "INFINITY", and "iNfINity" are all acceptable spellings for positive
-   infinity.
+   Case is not significant, so, for example, "inf", "Inf", "INFINITY", and
+   "iNfINity" are all acceptable spellings for positive infinity.
 
    Otherwise, if the argument is an integer or a floating point number, a
    floating point number with the same value (within Python's floating point