mirror of https://github.com/python/cpython.git
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:
parent
d371ff17a1
commit
3bbef60990
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue