Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> added the comment: 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) ---------- nosy: +rbp Added file: http://bugs.python.org/file10270/len_message.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2723> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com