[Python-3000] range() issues
Guido van Rossum
guido at python.org
Thu May 1 02:16:26 CEST 2008
On Wed, Apr 30, 2008 at 5:10 PM, Benjamin Peterson
<musiccomposition at gmail.com> wrote:
> On Wed, Apr 30, 2008 at 6:41 PM, Guido van Rossum <guido at python.org> wrote:
> > I've come across situations where len() raising an exception was more
> > inconvenient than returning a truncated value (e.g. when printing).
>
> In those cases, shouldn't you be explicit, catch the overflow
> exception, and then use sys.maxsize?
That's what I did *after* a big run crashed. :-(
> > But I didn't find a rationale. I'm sure it was PBP though.
>
> What's PBP? (A search only turns up a bicycle race. :))
Practicality Beats Purity, from the zen of Python.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list