Mercurial > cpython-lru_cache-weakref
diff Objects/typeobject.c @ 55131:59cf5f808c24 3.1
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.
........
| author | Amaury Forgeot d'Arc <amauryfa@gmail.com> |
|---|---|
| date | Tue, 07 Jul 2009 00:45:43 +0000 |
| parents | f48a05214281 |
| children | 9714f8a77b16 b7aabba84ee1 |
line wrap: on
line diff
--- a/Objects/typeobject.c Mon Jul 06 13:54:37 2009 +0000 +++ b/Objects/typeobject.c Tue Jul 07 00:45:43 2009 +0000 @@ -4807,10 +4807,8 @@ } 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; }
