summaryrefslogtreecommitdiffstats
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
authorJack Diederich <jackdied@gmail.com>2006-11-28 19:15:13 (GMT)
committerJack Diederich <jackdied@gmail.com>2006-11-28 19:15:13 (GMT)
commit4dafcc4ece09c2a60473bb109513de4e7d2c2b11 (patch)
tree32be8af9dd16e1ea407bf008c92d62f7cd7539bd /Objects/complexobject.c
parentdfc9d4f7aa38a3961847c034532e39f05a569f54 (diff)
downloadcpython-4dafcc4ece09c2a60473bb109513de4e7d2c2b11.zip
cpython-4dafcc4ece09c2a60473bb109513de4e7d2c2b11.tar.gz
cpython-4dafcc4ece09c2a60473bb109513de4e7d2c2b11.tar.bz2
- patch #1600346 submitted by Tomer Filiba
- Renamed nb_nonzero slots to nb_bool - Renamed __nonzero__ methods to __bool__ - update core, lib, docs, and tests to match
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r--Objects/complexobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 2713e3e..da47f81 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -568,7 +568,7 @@ complex_abs(PyComplexObject *v)
}
static int
-complex_nonzero(PyComplexObject *v)
+complex_bool(PyComplexObject *v)
{
return v->cval.real != 0.0 || v->cval.imag != 0.0;
}
@@ -938,7 +938,7 @@ static PyNumberMethods complex_as_number = {
(unaryfunc)complex_neg, /* nb_negative */
(unaryfunc)complex_pos, /* nb_positive */
(unaryfunc)complex_abs, /* nb_absolute */
- (inquiry)complex_nonzero, /* nb_nonzero */
+ (inquiry)complex_bool, /* nb_bool */
0, /* nb_invert */
0, /* nb_lshift */
0, /* nb_rshift */