A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-October/104423.html below:

[Python-Dev] Inclusive Range

[Python-Dev] Inclusive RangeEviatar Bach eviatarbach at gmail.com
Mon Oct 4 05:04:55 CEST 2010
Hello,

I have a proposal of making the range() function inclusive; that is,
range(3) would generate 0, 1, 2, and 3, as opposed to 0, 1, and 2. Not only
is it more intuitive, it also seems to be used often, with coders often
writing range(0, example+1) to get the intended result. It would be easy to
implement, and though significant, is not any more drastic than changing
print to a function in Python 3. Of course, if this were done, slicing
behaviour would have to be adjusted accordingly.

What are your thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101003/748941c6/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4