-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
PEP 701 said:
Similarly, this PEP leaves up to the implementation the level of expression nesting in format specifiers but specifies a lower bound of 2 levels of nesting. This means that the following should always be valid:
f"{'':*^{1:{1}}}"
However, the docs haven't updated:
BTW, IIUC the specification of f-string has moved from syntax(lexical) to grammar.
Thus, it probably should be moved from https://docs.python.org/3.12/reference/lexical_analysis.html#formatted-string-literals to https://docs.python.org/3.12/reference/grammar.html or https://docs.python.org/3.12/reference/expressions.html#literals. Or a special note should be added.
At least this lexical grammar is outdated and should be removed (or replaced by the PEG grammar):
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir