This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | rbp |
|---|---|
| Recipients | belopolsky, benjamin.peterson, pitrou, rbp, rhettinger |
| Date | 2008年05月10日.19:46:48 |
| SpamBayes Score | 0.0010935355 |
| Marked as misclassified | No |
| Message-id | <1210448811.71.0.166028568848.issue2723@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I think returning sys.{maxint,maxsize} in this case is a plain lie.
That's not practicality, that's giving back false information.
Barring drastic language changes (such as having objects representing
"infinity" or "greater than" - which, of course, won't happen), I think
the current behaviour of raising an exception is the correct one. But,
although I think OverflowError is good enough, the current exception
message is a bit cryptic, especially for anyone who doesn't know C:
"""OverflowError: Python int too large to convert to C ssize_t"""
I've attached a simple patch (modified from Alexander's) to raise:
"""OverflowError: Length too large"""
(I thought about "Object too large", but our problem is actually that
the *length* itself is too large) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年05月10日 19:46:52 | rbp | set | spambayes_score: 0.00109354 -> 0.0010935355 recipients: + rbp, rhettinger, belopolsky, pitrou, benjamin.peterson |
| 2008年05月10日 19:46:51 | rbp | set | spambayes_score: 0.00109354 -> 0.00109354 messageid: <1210448811.71.0.166028568848.issue2723@psf.upfronthosting.co.za> |
| 2008年05月10日 19:46:50 | rbp | link | issue2723 messages |
| 2008年05月10日 19:46:49 | rbp | create | |