[Python-bugs-list] Very long lines fool tracebacks (PR#75)
tim_one@email.msn.com
tim_one@email.msn.com
Fri, 10 Sep 1999 21:46:56 -0400 (EDT)
Full_Name: Tim Peters
Version: 1.5.2
OS: Win95
Submission from: 1cust239.tnt4.bos1.da.uu.net (63.21.45.239)
The traceback-printing mechanism calls fgets with a buffer of 1000 chars.
Source lines larger than 1000 chars thus get treated as being more than one
line, causing the line actually printed to be off by a number of lines equal to
the number of times fgets gets fooled before reaching the target line number.
This popped up in c.l.py in what's likely the most unreasonable Python script
I've ever seen. I don't have a lot of sympathy for that, but the off-by-3 here
then off-by-4 there (etc) tracebacks only made a miserable situation laughable
<wink>.
I'll look into cheap ways to fix this, and submit a patch if I find one.