mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue