Documentation
The floating point syntax spec is incorrect, and can be found in /Doc/library/functions.rst:
The syntax rendered currently is the following:
sign::="+"|"-"infinity::="Infinity"|"inf"nan::="nan"digitpart::= `!digit` (["_"] `!digit`)*number::= [digitpart] "."digitpart|digitpart ["."]
exponent::= ("e"|"E") ["+"|"-"] digitpartfloatnumber::=number [exponent]
floatvalue::= [sign] (floatnumber|infinity|nan)digitpart should not include an exclamation point or backtick quotes. The backticks appear to be the underlying syntax failing to render, but the exclamation points have a meaning, which is an issue. This is the underlying syntax:
sign: "+"| "-"infinity: "Infinity"| "inf"nan: "nan"digitpart: `!digit`(["_"] `!digit`)*number: [`digitpart`] "." `digitpart` | `digitpart` ["."]exponent: ("e" | "E") ["+" | "-"] `digitpart`floatnumber: number [`exponent`]EBNF includes a "Special Sequences" syntax, that would be appropriate for this situation, but I'm uncertain if it is possible to use in the underlying YAML format. It should be rendered like this:
sign::="+"|"-"infinity::="Infinity"|"inf"nan::="nan"digit::=? Any character in the unicode digit class ?digitpart::=digit (["_"] digit)*number::= [digitpart] "."digitpart|digitpart ["."]
exponent::= ("e"|"E") ["+"|"-"] digitpartfloatnumber::=number [exponent]
floatvalue::= [sign] (floatnumber|infinity|nan)Linked PRs
Documentation
The floating point syntax spec is incorrect, and can be found in /Doc/library/functions.rst:
The syntax rendered currently is the following:
digitpartshould not include an exclamation point or backtick quotes. The backticks appear to be the underlying syntax failing to render, but the exclamation points have a meaning, which is an issue. This is the underlying syntax:EBNF includes a "Special Sequences" syntax, that would be appropriate for this situation, but I'm uncertain if it is possible to use in the underlying YAML format. It should be rendered like this:
Linked PRs
digitin the float() docs #114080digitin the float() docs (GH-114080) #114094digitin the float() docs (GH-114080) #114095