This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients alanmcintyre, alexeychen, amaury.forgeotdarc, brett.cannon, christian.heimes, complex, gvanrossum, jafo, nas, nnorwitz, pythonmeister
Date 2007-11-14.03:14:24
SpamBayes Score 0.038100313
Marked as misclassified No
Message-id <1195010065.12.0.350722523348.issue1134@psf.upfronthosting.co.za>
In-reply-to
Content
I've already raised the priority to draw more attention to this bug.

So far I'm not able to solve the bug but I've nailed down the issue to a
short test case:

HANGS:
# -*- coding: ascii -*-
"""
"""

The problem manifests itself only in the combination of the ascii
encoding and triple quotes across two or more line. Neither a different
encoding nor a string across a single line has the same problem

WORKS:
# -*- coding: ascii -*-
""" """

WORKS:
# -*- coding: latin.1 -*-
"""
"""

WORKS:
# -*- coding: ascii -*-
""" """

DOESN'T COMPILE:
# -*- coding: ascii -*-
"\
"
File "hungry_script2.py", line 5
SyntaxError: EOL while scanning single-quoted string

The latest example does compile with Python 2.5. Please note also the
wrong line number. The file has only three (!) lines.

During my debugging session I saw an infinite loop in tokenzize.c:1429

  letter_quote:
	/* String */
	if (c == '\'' || c == '"') {
		...
		for (;;) {
			INFINITE LOOP
		}
History
Date User Action Args
2007-11-14 03:14:25christian.heimessetspambayes_score: 0.0381003 -> 0.038100313
recipients: + christian.heimes, gvanrossum, nnorwitz, brett.cannon, complex, jafo, amaury.forgeotdarc, alanmcintyre, pythonmeister, alexeychen, nas
2007-11-14 03:14:25christian.heimessetspambayes_score: 0.0381003 -> 0.0381003
messageid: <1195010065.12.0.350722523348.issue1134@psf.upfronthosting.co.za>
2007-11-14 03:14:25christian.heimeslinkissue1134 messages
2007-11-14 03:14:24christian.heimescreate