[ python-Bugs-1385040 ] compiler module does not detect a syntax error
SourceForge.net
noreply at sourceforge.net
Sun Apr 30 22:20:48 CEST 2006
Bugs item #1385040, was opened at 2005-12-19 09:58
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1385040&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Harri Pasanen (harripasanen)
Assigned to: Jeremy Hylton (jhylton)
Summary: compiler module does not detect a syntax error
Initial Comment:
import compiler
compiler.parse("def foo(a=1,b): pass")
Gives:
Module(None, Stmt([Function(None, 'foo', ['a', 'b'],
[Const(1)], 0, None, Stmt([Pass()]))]))
However, the python interpreter itself barks for the
same code:
SyntaxError: non-default argument follows default
argument
-Harri
----------------------------------------------------------------------
>Comment By: Georg Brandl (gbrandl)
Date: 2006-04-30 20:20
Message:
Logged In: YES
user_id=849994
Attaching patch. Please review.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-02-25 21:59
Message:
Logged In: YES
user_id=33168
FYI.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1385040&group_id=5470
More information about the Python-bugs-list
mailing list