[Python-ideas] String interpolation for all literal strings

Guido van Rossum guido at python.org
Fri Aug 7 10:49:14 CEST 2015


On Fri, Aug 7, 2015 at 9:33 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:

> We could potentially make f-strings translation friendly by
> introducing a bit of indirection into the f-string design: an
> __interpolate__ builtin, along the lines of __import__.
>

This seems interesting, but doesn't it require sys._getframe() or similar
again? Translations may need to reorder variables. (Or even change the
expressions? E.g. to access odd plurals?)

The sys._getframe() requirement (if true) would kill this idea thoroughly
for me.

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150807/1077a0af/attachment-0001.html>


More information about the Python-ideas mailing list