On Tue, Apr 29, 2008 at 8: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.
Why not leave sq_length as is, but have len() bypass it and call .__len__() directly? C code is likely allocating memory for whatever length it's given, so a sq_length overflow just makes it fail earlier, whereas python code could be more creative (such as printing the length of an on-disk container.) The problem with the indexing API also calling sq_length is moot since you've decided to remove it from range. -- Adam Olsen, aka Rhamphoryncus _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com