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/2011-September/113712.html below:

[Python-Dev] range objects in 3.x

[Python-Dev] range objects in 3.xEthan Furman ethan at stoneleaf.us
Tue Sep 27 23:39:43 CEST 2011
Guido van Rossum wrote:
> On Tue, Sep 27, 2011 at 1:21 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
>> Guido van Rossum wrote:
>>> But why offer an API that is an attractive nuisance? I don't think
>>> that it is a burden to the user to have to specify "from 0 to 2 inches
>>> in 8 steps" instead of "from 0 to 2 inches in 1/4 inch steps". (And
>>> what if they tried to say "from 0 to 3 1/4 inches in 1/2 inch steps"
>>> ?)
>> And how many steps in "from 37 3/4 inches to 90 1/4 inches" ?  I don't want
>> to have to calculate that.  That's what computers are for.
> 
> That's just silly. The number of steps is (stop - start) / step.

Not silly at all -- it begs for an api of (start, stop, step), not 
(start, stop, count).

Personally, I have no problems with typing either 'step=...' or 
'stop=...', but I think losing step as an option is a *ahem* step backwards.

~Ethan~
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