- 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
This commit is contained in:
Jack Diederich 2006-11-28 19:15:13 +00:00
parent dfc9d4f7aa
commit 4dafcc4ece
31 changed files with 118 additions and 82 deletions

View file

@ -499,7 +499,7 @@ WRAP_BINARY(proxy_ixor, PyNumber_InPlaceXor)
WRAP_BINARY(proxy_ior, PyNumber_InPlaceOr)
static int
proxy_nonzero(PyWeakReference *proxy)
proxy_bool(PyWeakReference *proxy)
{
PyObject *o = PyWeakref_GET_OBJECT(proxy);
if (!proxy_checkref(proxy))
@ -596,7 +596,7 @@ static PyNumberMethods proxy_as_number = {
proxy_neg, /*nb_negative*/
proxy_pos, /*nb_positive*/
proxy_abs, /*nb_absolute*/
(inquiry)proxy_nonzero, /*nb_nonzero*/
(inquiry)proxy_bool, /*nb_bool*/
proxy_invert, /*nb_invert*/
proxy_lshift, /*nb_lshift*/
proxy_rshift, /*nb_rshift*/