Eric V. Smith <e...@trueblade.com> added the comment:

PEP 3101 defines format strings as intermingled character data and markup. 
Markup defines replacement fields and is delimited by braces. Only after markup 
is extracted does the PEP talk about interpreting the contents of the markup.

So, given "{0[a}b]}" the parser first parses out the character data and the 
markup. The first piece of markup is "{0[a}". That gives a syntax error because 
it's missing a right bracket.

I realize you'd like the parser to find the markup as the entire string, but 
that's not how I read the PEP.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12014>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to