[Python-ideas] String interpolation for all literal strings

Barry Warsaw barry at python.org
Fri Aug 7 18:18:21 CEST 2015


On Aug 07, 2015, at 12:13 PM, Guido van Rossum wrote:

>OK, that sounds reasonable, except that translators need to control
>substitution order, so s % tuple(...) doesn't work. However, if we use
>s.format(...) we can use "This interpolates {0} and {1}", and then I'm
>satisfied. (Further details of the signature of __interpolate__ TBD.)

That doesn't work either, but this does:

"This interpolates {apples} and {oranges}".

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150807/7e4a7a55/attachment.sig>


More information about the Python-ideas mailing list