mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Stupid bug: complex(x,y) would yield x+xj
This commit is contained in:
parent
87755a24c2
commit
b072150d7f
1 changed files with 1 additions and 1 deletions
|
@ -318,7 +318,7 @@ builtin_complex(self, args)
|
||||||
else if (is_complexobject(i))
|
else if (is_complexobject(i))
|
||||||
ci = ((complexobject*)i)->cval;
|
ci = ((complexobject*)i)->cval;
|
||||||
else {
|
else {
|
||||||
tmp = (*nbr->nb_float)(r);
|
tmp = (*nbr->nb_float)(i);
|
||||||
if (tmp == NULL)
|
if (tmp == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
ci.real = getfloatvalue(tmp);
|
ci.real = getfloatvalue(tmp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue