[Python-3000] Should len() clip to sys.maxsize or raiseOverflowError?
hagenf at coli.uni-saarland.de
Wed Sep 3 10:23:37 CEST 2008
> That said, I would actually be okay with the status quo (which does
> raise an OverflowError) as long as we commit to fixing this properly
> in 2.7 / 3.1, by removing the range restriction (like we've done for
> other int operations a long time ago).
What should be done when __len__() returns a float? In Python 2.6 the
behaviour depends on whether the class in new-style or not. (Old-style
classes raise a TypeError, new-style classes truncate.) Is there any
good reason for truncating?
More information about the Python-3000