File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -640,12 +640,14 @@ Instead of the normal ``%``\ -based substitutions, Templates support ``$``\
640640* ``$$ `` is an escape; it is replaced with a single ``$ ``.
641641
642642* ``$identifier `` names a substitution placeholder matching a mapping key of
643- ``"identifier" ``. By default, ``"identifier" `` must spell a Python
644- identifier. The first non-identifier character after the ``$ `` character
645- terminates this placeholder specification.
646-
647- * ``${identifier} `` is equivalent to ``$identifier ``. It is required when valid
648- identifier characters follow the placeholder but are not part of the
643+ ``"identifier" ``. By default, ``"identifier" `` is restricted to any
644+ case-insensitive ASCII alphanumeric string (including underscores) that
645+ starts with an underscore or ASCII letter. The first non-identifier
646+ character after the ``$ `` character terminates this placeholder
647+ specification.
648+
649+ * ``${identifier} `` is equivalent to ``$identifier ``. It is required when
650+ valid identifier characters follow the placeholder but are not part of the
649651 placeholder, such as ``"${noun}ification" ``.
650652
651653Any other appearance of ``$ `` in the string will result in a :exc: `ValueError `
Original file line number Diff line number Diff line change @@ -323,6 +323,9 @@ C API
323323Documentation
324324-------------
325325
326+ - Issue #24351: Clarify what is meant by "identifier" in the context of
327+ string.Template instances.
328+
326329- Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
327330 doc. Remove obsolete example from FAQ. Patch by Martin Panter.
328331
You can’t perform that action at this time.
0 commit comments