changeset: 96568:20bf84cd38bc branch: 3.4 parent: 96565:bb51d486a899 user: Barry Warsaw date: Tue Jun 09 14:20:31 2015 -0400 files: Doc/library/string.rst Misc/NEWS description: - Issue #24351: Clarify what is meant by "identifier" in the context of string.Template instances. diff -r bb51d486a899 -r 20bf84cd38bc Doc/library/string.rst --- a/Doc/library/string.rst Tue Jun 09 18:40:16 2015 +0300 +++ b/Doc/library/string.rst Tue Jun 09 14:20:31 2015 -0400 @@ -640,12 +640,14 @@ * ``$$`` is an escape; it is replaced with a single ``$``. * ``$identifier`` names a substitution placeholder matching a mapping key of - ``"identifier"``. By default, ``"identifier"`` must spell a Python - identifier. The first non-identifier character after the ``$`` character - terminates this placeholder specification. + ``"identifier"``. By default, ``"identifier"`` is restricted to any + case-insensitive ASCII alphanumeric string (including underscores) that + starts with an underscore or ASCII letter. The first non-identifier + character after the ``$`` character terminates this placeholder + specification. -* ``${identifier}`` is equivalent to ``$identifier``. It is required when valid - identifier characters follow the placeholder but are not part of the +* ``${identifier}`` is equivalent to ``$identifier``. It is required when + valid identifier characters follow the placeholder but are not part of the placeholder, such as ``"${noun}ification"``. Any other appearance of ``$`` in the string will result in a :exc:`ValueError` diff -r bb51d486a899 -r 20bf84cd38bc Misc/NEWS --- a/Misc/NEWS Tue Jun 09 18:40:16 2015 +0300 +++ b/Misc/NEWS Tue Jun 09 14:20:31 2015 -0400 @@ -323,6 +323,9 @@ Documentation ------------- +- Issue #24351: Clarify what is meant by "identifier" in the context of + string.Template instances. + - Issue #22155: Add File Handlers subsection with createfilehandler to tkinter doc. Remove obsolete example from FAQ. Patch by Martin Panter.