[Python-Dev] proposal: evaluated string

tomer filiba tomerfiliba at gmail.com
Thu Apr 20 19:50:46 CEST 2006


just like r"" does the escaping for you.
but estr types must be implemented so the evaluate with the current scope
(locals and globals),
not the score they were defined it, so unless you want to do nasty tricks
with sys._getframe,
which doesn't work on all implementations of python, you'll need it as a
builtin

-tomer

On 4/20/06, Josiah Carlson <jcarlson at uci.edu> wrote:
>
>
> "tomer filiba" <tomerfiliba at gmail.com> wrote:
> > the evaluated string will be evaluated based on the current scope
> (locals
> > and globals), just like
> > normal expressions. the difference is, the results of the expressions
> will
> > be str()ed into the
> > evaluated string directly. these expressions will be embedded into the
> > string surrounded by
>
> -1  You are basically suggesting that e"..." be a replacement for
> "..."%locals() .  That doesn't seem to me to be sufficiently compelling
> (yes, I do use string interpolation).
>
>
> - Josiah
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060420/cc525a0c/attachment.html 


More information about the Python-Dev mailing list