mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merged revisions 73868 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r73868 | amaury.forgeotdarc | 2009-07-07 02:43:08 +0200 (mar., 07 juil. 2009) | 3 lines #6428: py3k requires that __bool__ return a bool (and not an int) Fix the error message and the documentation. ........
This commit is contained in:
parent
c9722e56d5
commit
79fa5ab7b0
3 changed files with 11 additions and 9 deletions
|
@ -4807,10 +4807,8 @@ slot_nb_bool(PyObject *self)
|
|||
}
|
||||
else {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%s should return "
|
||||
"bool or int, returned %s",
|
||||
(using_len ? "__len__"
|
||||
: "__bool__"),
|
||||
"__bool__ should return "
|
||||
"bool, returned %s",
|
||||
Py_TYPE(temp)->tp_name);
|
||||
result = -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue