[Python-3000] Please don't kill the % operator...

Eric Smith eric+python-dev at trueblade.com
Fri Aug 17 07:09:21 CEST 2007


Martin v. Löwis wrote:
> Bill Janssen schrieb:
>>> I think most of these points are irrelevant. The curly braces are not
>>> just syntactic sugar, at least the opening brace is not; the digit
>>> is not syntactic sugar in the case of message translations.
>> Are there "computation of matching braces" problems here?
> 
> I don't understand: AFAIK, the braces don't nest, so the closing
> brace just marks the end of the place holder (which in the printf
> format is defined by the type letter).

I don't understand, either.  The braces do nest, but I don't know what 
the "computation of matching brace" problem is.

This test currently passes in my implementation:
         self.assertEqual('{0[{bar}]}'.format('abcdefg', bar=4), 'e')

This shows nesting braces working.  Bill, what problem are you thinking of?

Eric.



More information about the Python-3000 mailing list