Guido van Rossum <guido <at> python.org> writes: > > FWIW, are there any legitimate occurrences of OverflowError in Py3k > now that ints have unlimited range?
Legitimate: >>> n = 2 ** 16384 >>> float(n) Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: Python int too large to convert to C double Perhaps a bit less legitimate but still :) >>> r = range(n) >>> len(r) Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: Python int too large to convert to C ssize_t Speaking of which, http://bugs.python.org/issue2690 (« Precompute range length », which has the - positive, IMHO - side effect that range objects of length greater than sys.maxsize cannot be created at all) is still awaiting a resolution. Regards Antoine. _______________________________________________ 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