Christian Heimes added the comment:

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
                }

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1134>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to