Strange writing not detected

François Pinard pinard at iro.umontreal.ca
Tue Sep 14 22:02:44 EDT 1999


Hi, people.  I made the following mistake (reduced, of course):

        >>> def f(a=0, a=0):
        ...	print a
        ... 
        >>> f(3)
        0

In fact, I had many keywords arguments distributed over two lines, and
just missed that one of them was repeated, and the results were unexpected.
May I suggest that the byte compiler should refuse repeated arguments?

This is Python 1.5.2.

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





More information about the Python-list mailing list