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
f2fac9c6
Commit
f2fac9c6
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
8df2cc7a
Changes
2
Hide 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 @
f2fac9c6
...
@@ -640,12 +640,14 @@ Instead of the normal ``%``\ -based substitutions, Templates support ``$``\
...
@@ -640,12 +640,14 @@ Instead of the normal ``%``\ -based substitutions, Templates support ``$``\
* ``$$`` is an escape; it is replaced with a single ``$``.
* ``$$`` is an escape; it is replaced with a single ``$``.
* ``$identifier`` names a substitution placeholder matching a mapping key of
* ``$identifier`` names a substitution placeholder matching a mapping key of
``"identifier"``. By default, ``"identifier"`` must spell a Python
``"identifier"``. By default, ``"identifier"`` is restricted to any
identifier. The first non-identifier character after the ``$`` character
case-insensitive ASCII alphanumeric string (including underscores) that
terminates this placeholder specification.
starts with an underscore or ASCII letter. The first non-identifier
character after the ``$`` character terminates this placeholder
* ``${identifier}`` is equivalent to ``$identifier``. It is required when valid
specification.
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"``.
placeholder, such as ``"${noun}ification"``.
Any other appearance of ``$`` in the string will result in a :exc:`ValueError`
Any other appearance of ``$`` in the string will result in a :exc:`ValueError`
...
...
Misc/NEWS
View file @
f2fac9c6
...
@@ -323,6 +323,9 @@ C API
...
@@ -323,6 +323,9 @@ C API
Documentation
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
- Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
doc. Remove obsolete example from FAQ. Patch by Martin Panter.
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