[issue2384] [Py3k] line number is wrong after encoding declaration

STINNER Victor report at bugs.python.org
Wed Oct 8 01:22:07 CEST 2008


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

@amaury: Ok, I added your long comment in tokenizer.c. You're also 
right about the strange code in the test. I reused ocean-city's 
test. "sys.exc_info()[2].tb_lineno" raises an additional (useless) 
error. So I simplified the code to use only "raise RuntimeError(...)" 
with the try/except/else.

Since tokenizer.c is hard to understand, I don't wnat to change the 
code of tok_nextc().

Added file: http://bugs.python.org/file11737/traceback_unicode-4.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2384>
_______________________________________


More information about the Python-bugs-list mailing list