New submission from Alexander Belopolsky <[EMAIL PROTECTED]>: On Tue, Apr 29, 2008 at 10:36 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: .. > Let's also fix __len__() so that it returns sys.{maxint,maxsize} when > the result doesn't fit in a Py_ssize_t.
http://mail.python.org/pipermail/python-3000/2008-April/013343.html With attached patch given class x: def __len__(self): return 2**100 len(x()) and len(range(2**100)) will return sys.maxsize. ---------- components: Interpreter Core files: len.diff keywords: patch messages: 65989 nosy: belopolsky severity: normal status: open title: Truncate __len__() at sys.maxsize versions: Python 3.0 Added file: http://bugs.python.org/file10143/len.diff __________________________________ 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