[issue3298] Multiline string with quotes is not parsed correctly.

2008-07-06 Thread Stavros Korokithakis
Stavros Korokithakis <[EMAIL PROTECTED]> added the comment: Ah, interesting, I had forgotten that adjacent strings are merged. Thanks. ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3298] Multiline string with quotes is not parsed correctly.

2008-07-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: The last quote starts another string literal, so this is valid Python: """A "test B" and results in a string 'A "test B'. The lexer cannot know whether the second string literal is terminated or not, yielding valid or invalid code. __

[issue3298] Multiline string with quotes is not parsed correctly.

2008-07-06 Thread Stavros Korokithakis
Stavros Korokithakis <[EMAIL PROTECTED]> added the comment: Hmm, what would be the meaning of """ " in this particular context? I can't think of a situation where """A test""" " would be valid code. ___ Python tracker <[EMAIL PROTECTED]>

[issue3298] Multiline string with quotes is not parsed correctly.

2008-07-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: There is an ambiguity: did you mean """ " or " """ (spaces added for clarity). Python does not count quotes, parentheses or similar in strings, so the first occurrence of """ will close the literal. You can either use triple single quotes, or e

[issue3298] Multiline string with quotes is not parsed correctly.

2008-07-06 Thread Stavros Korokithakis
New submission from Stavros Korokithakis <[EMAIL PROTECTED]>: A multiline string with quotes next to the ending quote is not parsed correctly: In [1]: """A "test File "", line 1 """A "test ^ : EOL whi