[Python-bugs-list] [Bug #110628] Python 1.6a1 - Poor diagnostic (PR#278)

noreply@sourceforge.net noreply@sourceforge.net
Tue, 15 Aug 2000 08:53:18 -0700


Bug #110628, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Closed
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Python 1.6a1 - Poor diagnostic (PR#278)

Details: Jitterbug-Id: 278
Submitted-By: =?ISO-8859-1?Q?Fran=E7ois_Pinard?= <pinard@iro.umontreal.ca>
Date: 06 Apr 2000 11:10:00 -0400
Version: None
OS: None

Hello.  This might be seen as a limitation, rather than a bug.  This is
not specific to 1.6a1, as 1.5.2 shows the same.

Executing a Python script yields:


Traceback (most recent call last):
  File "./to-html", line 26, in ?
    import data, htmlpage, localweb, registry
SyntaxError: non-keyword arg after keyword arg (line 26)


There is such an error in file `../lib/htmlpage.py' here, so the diagnostic
is proper.  However, a mere `(line 26)' does not hint about which of the four
imported sources has the error.  As a way around the poor diagnostic, you
might suggest that I avoid bundling many imports on one line.  This would
help of course, but I still think Python could do better, here.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





====================================================================
Audit trail:
Mon May 22 17:50:15 2000	guido	changed notes
Mon May 22 17:50:15 2000	guido	moved from incoming to open

Follow-Ups:

Date: 2000-Aug-15 08:53
By: fdrake

Comment:
Changed SyntaxError generation and formatting to provide more information in the displayed message.  The changes add the "filename" and "lineno" attributes to SyntaxError exceptions when those values are known.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110628&group_id=5470