mirror of https://github.com/python/cpython
Stupid bug: complex(x,y) would yield x+xj
This commit is contained in:
parent
87755a24c2
commit
b072150d7f
|
@ -318,7 +318,7 @@ builtin_complex(self, args)
|
|||
else if (is_complexobject(i))
|
||||
ci = ((complexobject*)i)->cval;
|
||||
else {
|
||||
tmp = (*nbr->nb_float)(r);
|
||||
tmp = (*nbr->nb_float)(i);
|
||||
if (tmp == NULL)
|
||||
return NULL;
|
||||
ci.real = getfloatvalue(tmp);
|
||||
|
|
Loading…
Reference in New Issue