Issue1228217
Created on 2005-06-27.12:53:36 by archon55, last changed 2005-07-04.18:35:28 by bzimmer.
msg2455 (view) |
Author: Mike_G (archon55) |
Date: 2005-06-27.12:53:36 |
|
PyComplex method complex_new was not checking for
keyword arguments making it possible to do:
complex(imag=3,imag=4) or
complex(real=5, real=7)
This fix eliminates this by throwing a SyntaxError like
Python.
>>> complex(imag=4,imag=3)
Traceback (innermost last):
File "<console>", line 1, in ?
File "None", line None
SyntaxError: duplicate keyword argument.
>>> complex(real=4,real=3)
Traceback (innermost last):
File "<console>", line 1, in ?
File "None", line None
SyntaxError: duplicate keyword argument.
>>> complex(imag=4)
4j
>>> complex(real=4)
(4+0j)
>>> complex(real=4,imag=98)
(4+98j)
>>>
|
msg2456 (view) |
Author: Brian Zimmer (bzimmer) |
Date: 2005-07-04.18:35:28 |
|
Logged In: YES
user_id=37674
This works for me already on tip.
|
|
Date |
User |
Action |
Args |
2005-06-27 12:53:36 | archon55 | create | |
|