summaryrefslogtreecommitdiffstats
path: root/PC
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 /PC
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 'PC')
-rw-r--r--PC/_winreg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c
index c501033..bacb9dd 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -305,7 +305,7 @@ PyDoc_STRVAR(PyHKEY_doc,
"handle - The integer Win32 handle.\n"
"\n"
"Operations:\n"
-"__nonzero__ - Handles with an open object return true, otherwise false.\n"
+"__bool__ - Handles with an open object return true, otherwise false.\n"
"__int__ - Converting a handle to an integer returns the Win32 handle.\n"
"__cmp__ - Handle objects are compared using the handle value.");
@@ -375,7 +375,7 @@ PyHKEY_deallocFunc(PyObject *ob)
}
static int
-PyHKEY_nonzeroFunc(PyObject *ob)
+PyHKEY_boolFunc(PyObject *ob)
{
return ((PyHKEYObject *)ob)->hkey != 0;
}
@@ -437,7 +437,7 @@ static PyNumberMethods PyHKEY_NumberMethods =
PyHKEY_unaryFailureFunc, /* nb_negative */
PyHKEY_unaryFailureFunc, /* nb_positive */
PyHKEY_unaryFailureFunc, /* nb_absolute */
- PyHKEY_nonzeroFunc, /* nb_nonzero */
+ PyHKEY_boolFunc, /* nb_bool */
PyHKEY_unaryFailureFunc, /* nb_invert */
PyHKEY_binaryFailureFunc, /* nb_lshift */
PyHKEY_binaryFailureFunc, /* nb_rshift */