[Python-ideas] Draft2 PEP on string interpolation
Mike Miller
python-ideas at mgmiller.net
Thu Aug 27 18:51:19 CEST 2015
On 08/27/2015 09:19 AM, Cody Piersall wrote:
> When you say immediate, do you mean that it only takes a call to str()? Or is
> there some way to have e'this is an e-string' evaluate to a string without doing
> anything else?
There is no need to call str() manually with e'', the .rendered member is
returned by default:
>>> print(estr('Hello {friend}.'))
'Hello John'
Here is the example implementation:
https://bitbucket.org/mixmastamyk/docs/src/default/pep/estring_demo.py
-Mike
More information about the Python-ideas
mailing list