[Python-Dev] PEP 292, Simpler String Substitutions

Raymond Hettinger python@rcn.com
Thu, 20 Jun 2002 01:38:35 -0400


From: "Damien Morton" <damien.morton@acm.org>

> Why not simply add backquote notation to python strings. I read in a
> recent email from Timbot, I think,  that the backquote notation was
> originally intended for string interpolation too.
>
> "`name` is from `country`".sub()
> "`name.capitalize()` is from `country
> "`name` is %`height`4.1f meters tall".sub()
> "`name.capitalize()` can jump `height*1.7` meters".sub()

I'll bet this style would be brutal to read with the accented letters in
French.


Raymond Hettinger