Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
17d5f474
Commit
17d5f474
authored
Jun 09, 2015
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
parent
f330d536
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
Doc/library/string.rst
Doc/library/string.rst
+8
-6
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/string.rst
View file @
17d5f474
...
...
@@ -640,12 +640,14 @@ Instead of the normal ``%``\ -based substitutions, Templates support ``$``\
* ``$$`` 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}`` is equivalent to ``$identifier``. It is required when valid
identifier characters follow the placeholder but are not part of the
``"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
placeholder, such as ``"${noun}ification"``.
Any other appearance of ``$`` in the string will result in a :exc:`ValueError`
...
...
Misc/NEWS
View file @
17d5f474
...
...
@@ -323,6 +323,9 @@ C API
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment