Commit 3bbef609 authored by Guido van Rossum's avatar Guido van Rossum

Ai! complex_nonzero() has && which should be ||, else decidedly

non-zero things like 5j and complex(1,0) are considered to be
zero/false.  Tim Peters.
parent d371ff17
...@@ -514,7 +514,7 @@ static int ...@@ -514,7 +514,7 @@ static int
complex_nonzero(v) complex_nonzero(v)
PyComplexObject *v; PyComplexObject *v;
{ {
return v->cval.real != 0.0 && v->cval.imag != 0.0; return v->cval.real != 0.0 || v->cval.imag != 0.0;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment