[Python-bugs-list] Byte code compiler missed duplicate keyword args (PR#81)

skip@mojam.com skip@mojam.com
Wed, 15 Sep 1999 17:54:39 -0400 (EDT)


Full_Name: Skip Montanaro
Version: 1.5.2
OS: Linux
Submission from: uwire5.uwire.nunet.net (199.249.165.174)


Python 1.5.2 silently allows multiple keyword arguments in function definitions
as demonstrated by the following code snippet:

Python 1.5.2+ (#35, Aug 26 1999, 10:08:41)  [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> def f(a=0,a=0):
...   print a
... 
>>> f(3)
0

This was reported on the comp.lang.python by François Pinard.  I haven't seen
it fly by the bugs list so wanted to make sure it got recorded.

Skip