diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-07 00:45:43 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-07 00:45:43 (GMT) |
commit | 79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e (patch) | |
tree | baabcbcd2153799d2c9467ea019e6b519616d5df /Objects | |
parent | c9722e56d502a353d91881b48a788ab2470886d9 (diff) | |
download | cpython-79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e.zip cpython-79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e.tar.gz cpython-79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e.tar.bz2 |
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.
........
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 0e79542..60483e7 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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; } |