"Barry A. Warsaw" wrote:
"MAL" == M <mal@lemburg.com> writes:
MAL> Whatever you do, just please don't mix the old and new MAL> semantics...
MAL> 'Joe has $ %(a)5.2f in his pocket.' % locals()
MAL> is perfectly valid now and should continue to be valid.
I agree completely; it ought to be one or the other. In the code I emailed, you actually had to do a conversion step from $-strings to %-strings to use the build-in string-mod operator. In practice, if $-strings were to be added to the language, I suspect some new prefix would have to designate a new type of string object, e.g. $'' strings. Or perhaps a different binary operator could be used.
Good. Since the strings themselves don't really change and to avoid confusing string modifiers... ur$'my $format \$tring' I'd suggest to use a new operator, e.g. 'Joe has $$ $a in his pocket.' $ locals() -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/