summaryrefslogtreecommitdiffstats
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-01-25 19:42:19 (GMT)
committerGuido van Rossum <guido@python.org>1999-01-25 19:42:19 (GMT)
commit3bbef60990583cb61e797ccf902a122ffa6c923a (patch)
tree6a02235e4d149dd2f2091b0268a82df219a79093 /Objects/complexobject.c
parentd371ff17a19cc928b7a8586c51b24d9e0cddca43 (diff)
downloadcpython-3bbef60990583cb61e797ccf902a122ffa6c923a.zip
cpython-3bbef60990583cb61e797ccf902a122ffa6c923a.tar.gz
cpython-3bbef60990583cb61e797ccf902a122ffa6c923a.tar.bz2
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.
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r--Objects/complexobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 2e97713..e8447bb 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -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