How to parse over a Python expr?
Stefan Franke
franke at ableton.com
Mon Sep 2 11:30:48 EDT 2002
On Fri, 30 Aug 2002 16:41:56 -0700, Erik Max Francis <max at alcyone.com> wrote:
>Hmm, you're right. I didn't take into account the corner case where a
>triple-quoted string contains single-quoted strings. Thanks for
>catching that. (Fortunately, it's a rare occurrence that has certainly
>never happened in the field -- you'd have to do a triple-quoted string,
>then a single quoted one, _then_ an unbalanced close parenthesis.)
Are you sure? I think a TQS with a single quote inside would be
sufficient to miss the right TQS end:
'''That's all'''
These a 7 single quotes. Parsed as single-quote strings, the last one
opens a string until EOF.
More information about the Python-list
mailing list