[Python-Dev] PEP 215 redux: toward a simplified consensus?
Barry A. Warsaw
Mon, 25 Feb 2002 14:28:13 -0500
>>>>> "MAL" == M <firstname.lastname@example.org> writes:
MAL> Whatever you do, just please don't mix the old and new
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.