This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Problem reporting non-keyword arg after keyword arg syntax error
Type: compile error Stage:
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: facundobatista, ijmorlan
Priority: normal Keywords:

Created on 2008-03-10 20:29 by ijmorlan, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg63448 - (view) Author: Isaac Morland (ijmorlan) Date: 2008-03-10 20:29
$ cat bug_fine.py 
if True:
        max (a='a', 'b')
#elif True:
#       pass
else:
        pass
$ python bug_fine.py 
  File "bug_fine.py", line 2
    max (a='a', 'b')
SyntaxError: non-keyword arg after keyword arg
$ cat bug_show.py 
if True:
        max (a='a', 'b')
elif True:
        pass
else:
        pass
$ python bug_show.py 
Exception exceptions.SyntaxError: ('non-keyword arg after keyword arg',
2) in 'garbage collection' ignored
Fatal Python error: unexpected exception during garbage collection
Abort trap
$
msg63449 - (view) Author: Isaac Morland (ijmorlan) Date: 2008-03-10 20:33
I should add that the full version information is:

Python 2.5 (r25:51908, Aug 15 2007, 11:38:03) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin

Also, in my actual code (a much larger file, in a project using ll.xist
and other libraries), the error manifests differently:  I get
"TypeError: 'int' object is not iterable" on startup the first time it
loads, then it appears to run subsequent times, but behaves bizarrely. 
Specifically, *none* of the branches of the if statement run (verified
by putting a nonsense symbol after the if statement, and at the
beginning and end of each branch of the if statement; the "no such
symbol" error concerns the one *after* the if statement).  On neither
run is the "non-keyword arg after keyword arg" reported.
msg63451 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-03-10 21:32
Already fixed in the trunk. Thanks for the report!
History
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46522
2008-03-10 21:32:13facundobatistasetstatus: open -> closed
resolution: out of date
messages: + msg63451
nosy: + facundobatista
2008-03-10 20:33:45ijmorlansetmessages: + msg63449
2008-03-10 20:29:38ijmorlancreate