summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.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/floatobject.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/floatobject.c')
-rw-r--r--Objects/floatobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 40126b2..aab7612 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -837,7 +837,7 @@ float_abs(PyFloatObject *v)
}
static int
-float_nonzero(PyFloatObject *v)
+float_bool(PyFloatObject *v)
{
return v->ob_fval != 0.0;
}
@@ -1087,7 +1087,7 @@ static PyNumberMethods float_as_number = {
(unaryfunc)float_neg, /*nb_negative*/
(unaryfunc)float_pos, /*nb_positive*/
(unaryfunc)float_abs, /*nb_absolute*/
- (inquiry)float_nonzero, /*nb_nonzero*/
+ (inquiry)float_bool, /*nb_bool*/
0, /*nb_invert*/
0, /*nb_lshift*/
0, /*nb_rshift*/