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
9380acbb
Commit
9380acbb
authored
Jun 09, 2015
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Plain Diff
- Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
parents
86a60bfb
17d5f474
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
Doc/library/string.rst
Doc/library/string.rst
+8
-6
Misc/NEWS
Misc/NEWS
+6
-0
No files found.
Doc/library/string.rst
View file @
9380acbb
...
...
@@ -644,12 +644,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 @
9380acbb
...
...
@@ -45,6 +45,12 @@ Tests
tp_finalize to avoid reference leaks encountered when combining tp_dealloc
with PyType_FromSpec (see issue #16690 for details)
Documentation
-------------
- Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
What'
s
New
in
Python
3.5.0
beta
2
?
==================================
...
...
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