Message2455
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)
>>> |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:29 | admin | link | issue1228217 messages |
2008-02-20 17:18:29 | admin | create | |
|