RE: [Python-Dev] PEP 292, Simpler String Substitutions
19 Jun
2002
19 Jun
'02
5:35 p.m.
From: barry@zope.com [mailto:barry@zope.com]
"GvR" == Guido van Rossum
writes: GvR> That's a matter of validating the template before accepting GvR> it.
True, which isn't hard to do. You can write a regexp to extract the $names and then validate those. In fact, I think this is what newer versions of xgettext do for Python code (albeit with the %(name)s syntax).
Of course, once you've validated a string, it's almost no extra work to do the interpolation in place (at least in source code size). Tim Delaney
7953
Age (days ago)
7953
Last active (days ago)
0 comments
1 participants
participants (1)
-
Delaney, Timothy