Mercurial > cpython-lru_cache-weakref
diff Objects/object.c @ 40401:88133417dfd0
- 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
| author | Jack Diederich <jackdied@gmail.com> |
|---|---|
| date | Tue, 28 Nov 2006 19:15:13 +0000 |
| parents | aa59466ebd9c |
| children | d4fcb5656316 |
line wrap: on
line diff
--- a/Objects/object.c Wed Nov 22 14:42:41 2006 +0000 +++ b/Objects/object.c Tue Nov 28 19:15:13 2006 +0000 @@ -1246,8 +1246,8 @@ if (v == Py_None) return 0; else if (v->ob_type->tp_as_number != NULL && - v->ob_type->tp_as_number->nb_nonzero != NULL) - res = (*v->ob_type->tp_as_number->nb_nonzero)(v); + v->ob_type->tp_as_number->nb_bool != NULL) + res = (*v->ob_type->tp_as_number->nb_bool)(v); else if (v->ob_type->tp_as_mapping != NULL && v->ob_type->tp_as_mapping->mp_length != NULL) res = (*v->ob_type->tp_as_mapping->mp_length)(v);
