[Python-ideas] [Python-Dev] Inclusive Range
fuzzyman at voidspace.org.uk
Tue Oct 5 15:07:41 CEST 2010
On 5 October 2010 12:51, Carl M. Johnson <cmjohnson.mailinglist at gmail.com>wrote:
> Yup. TANSTAAFL. That's why we shouldn't actually bother to change
> things: you lose on the backend what you gain on the frontend. I'm
> just curious about whether starting programmers have a strong
> preference for one or the other convention or whether both are
Both teaching new programmers and programmers coming from other languages
I've found them confused by the range behaviour and usually end up having to
apologise for it (a sure sign of a language wart).
It is *good* that range(5) produces 5 values (0 to 4) but *weird* that
range(3, 10) doesn't include the 10.
Changing it now would be *very* backwards incompatible of course. Python 4
All the best,
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas