[Idle-dev] [ idlefork-Bugs-629983 ] SyntaxError in module reported poorly
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 06 Dec 2002 14:13:46 -0800
Bugs item #629983, was opened at 2002-10-28 12:24
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629983&group_id=9579
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Kurt B. Kaiser (kbk)
Summary: SyntaxError in module reported poorly
Initial Comment:
When an imported module contains a syntax error, the
traceback doesn't properly show the line with the
error. Example:
>>> import foo
Traceback (most recent call last):
File "<pyshell#2>", line 1, in ?
import foo
SyntaxError: invalid syntax ('foo.py', 1, 3, '1/\n')
>>>
The regular Python interpreter reports this:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "foo.py", line 1
1/
^
SyntaxError: invalid syntax
>>>
And IDLE 0.8 similarly:
>>> import foo
Traceback (most recent call last):
File "<pyshell#0>", line 1, in ?
import foo
File "/home/guido/trunk/Tools/idle/foo.py", line 1
1/
^
SyntaxError: invalid syntax
>>>
----------------------------------------------------------------------
>Comment By: Kurt B. Kaiser (kbk)
Date: 2002-12-06 17:13
Message:
Logged In: YES
user_id=149084
PyShell.py Rev 1.36
rpc.py Rev 1.10
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629983&group_id=9579