]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Stupid bug: complex(x,y) would yield x+xj
authorGuido van Rossum <guido@python.org>
Sat, 7 Sep 1996 15:55:27 +0000 (15:55 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 7 Sep 1996 15:55:27 +0000 (15:55 +0000)
Python/bltinmodule.c

index c337f1c1cbc4f414be73e8a9e358bf4a266b0549..c1c3ed917038a2aee13f99012dd9b644e0d83185 100644 (file)
@@ -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);