[Python-Dev] Re: Update PEP 292
Tim Peters
tim.peters at gmail.com
Fri Aug 20 06:34:31 CEST 2004
[Raymond Hettinger]
> That was a good example.
>
> However, I think we should follow Cheetah's example.
Sorry, I never heard of Cheetah before you mentioned it (& still don't
know what it is), so feel no pressure to ape it.
> That's makes it less of a pita when the template naturally contains
> dollar signs with numbers:
I don't care. The minority of Americans who want to use $ in a
minority of templated strings in a minority of apps can learn to type
$$, or use the ironically named SafeTemplate instead (as suggested
earlier).
> Template("Dear ${donor}, send $100.00 to the PSF template fund.")
Which would trigger an exception, after which they type one character
to repair it:
Template("Dear ${donor}, send $$100.00 to the PSF template fund.")
They'll live, but not at everyone else's expense. They're already
confused, or they wouldn't have bothered with the unnecessary braces
around "donor" <wink>.
More information about the Python-Dev
mailing list