[Python-Dev] *Simpler* string substitutions

Guido van Rossum guido@python.org
Thu, 20 Jun 2002 17:37:39 -0400


> If I'm going to move from %(name)fmt to ${name} I need a place for
> the fmt format. Given the error prone nature of %(name) should have
> been %(name)s
> 
> Howabout adding the format inside the {} for example:
> 
>     ${name:format}
> 
> You can then have
> 
>     $name
>     ${name}
>     ${name:s}
> 
> $name and ${name} work as you have already decided. ${name:format} allows
> the format to control the substitution.

Not bad.

--Guido van Rossum (home page: http://www.python.org/~guido/)