diff options
author | Guido van Rossum <guido@python.org> | 2005-09-20 18:49:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2005-09-20 18:49:54 (GMT) |
commit | 630db60a5533a3267e2cc07047498fad604e3c91 (patch) | |
tree | 9ce39ac2901a390b493b0af3aaf26989e4d52747 /Objects/classobject.c | |
parent | 1c2d7e5363d70ec6b8bb595b5565e27a0c4b05da (diff) | |
download | cpython-630db60a5533a3267e2cc07047498fad604e3c91.zip cpython-630db60a5533a3267e2cc07047498fad604e3c91.tar.gz cpython-630db60a5533a3267e2cc07047498fad604e3c91.tar.bz2 |
- On 64-bit platforms, when __len__() returns a value that cannot be
represented as a C int, raise OverflowError.
(Forward port from 2.4.2; the patch to classobject.c was already in
but needed a correction in the error message text.)
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r-- | Objects/classobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index f778387..ddec3e4 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -1019,7 +1019,7 @@ instance_length(PyInstanceObject *inst) /* Overflow check -- range of PyInt is more than C int */ if (outcome != temp) { PyErr_SetString(PyExc_OverflowError, - "__len__() should return 0 <= outcome < 2**32"); + "__len__() should return 0 <= outcome < 2**31"); outcome = -1; } else |