Georg Brandl wrote:
> Greg Ewing wrote:
> 
>>Barry Warsaw wrote:
>>
>>
>>>I don't much like the $"" prefix
>>
>>This was discussed during the last round of formatting
>>wars, and the conclusion was that having $ both
>>inside and outside the string would be too visually
>>confusing.
> 
> 
> Another issue is that current string prefixes act at parse time
> while the $ prefix would act at runtime.

A $ prefix would act at parse time, i.e., $"answer: $answer" would be 
equivalent to ("answer: " + str(answer)).  like r and u, $ would change 
the meaning of the literal, it wouldn't be an operator, and so this 
would be a syntax error:

     answer = 1
     msg = "answer: $answer"
     print $msg

Though I also agree that $"answer: $answer" introduces a confusing 
number of $'s.

-- 
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to