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.
This commit is contained in:
Guido van Rossum 1999-01-25 19:42:19 +00:00
parent d371ff17a1
commit 3bbef60990
1 changed files with 1 additions and 1 deletions

View File

@ -514,7 +514,7 @@ static int
complex_nonzero(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