Using special chars in Python string Templates

Posted on Wed 05 June 2013 in Python • Tagged with coding, python, strings, templatingLeave a comment

PEP-292 introduced a nice Python templating feature.
Templates placehoder names are subject to some restrictions,Documentation says:

$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.

This means that ...

Continue reading