[Python-3000] range() issues
Marcin ‘Qrczak’ Kowalczyk
qrczak at knm.org.pl
Wed Apr 30 21:14:14 CEST 2008
Dnia 29-04-2008, wto o godzinie 19:36 -0700, Guido van Rossum pisze:
> Let's also fix __len__() so that it returns sys.{maxint,maxsize} when
> the result doesn't fit in a Py_ssize_t.
Is this official? What should sq_length do when the real size doesn't
fit in a Py_ssize_t? It should be documented. Either return maxsize or
fail, with OverflowError probably.
I admit that the only case I have in mind is some virtual sequence
analogous to range (wrapped from my language in a Python object).
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Python-3000
mailing list