[Python-ideas] Should range() == range(0)?
Nick Coghlan
ncoghlan at gmail.com
Mon May 7 13:14:27 CEST 2012
On Mon, May 7, 2012 at 8:50 PM, Georg Brandl <g.brandl at gmx.net> wrote:
> For what gain? At the moment, I cannot think of any arguments in favor
> of the change, which is the point where arguments against it aren't
> even needed to keep the status quo.
>
> Ah yes: and I would rather have the bug
>
> for i in range(): # <- "n" (or equivalent) missing
>
> give me an explicit exception than silently "skipping" the loop.
> After all, the primary use case for range() is loops, and we should not
> make that use worse for the benefit of hypothetical other use cases.
Now *that's* a good reason to nix the idea :)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list