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/113683.html below:

[Python-Dev] range objects in 3.x

[Python-Dev] range objects in 3.x [Python-Dev] range objects in 3.xEthan Furman ethan at stoneleaf.us
Tue Sep 27 18:27:34 CEST 2011
Steven D'Aprano wrote:
> Alexander Belopolsky wrote:
> 
>> In addition to Steven's criticisms of numpy.linspace(), I would like a
>> new function to work with types other than float.  It certainly makes
>> sense to have range-like functionality for fractions and decimal
>> floats, but also I often find a need to generate a list of equally
>> spaces dates or datetime points.  It would be nice if a new function
>> would allow start and stop to be any type that supports subtraction
>> and whose differences support division by numbers.
> 
> I think a polymorphic numeric range function would be useful. If it 
> happened to support dates, that would be great, but I think that a 
> daterange() function in the datetime module would be more appropriate. 
> Who is going to think to import math if you want a range of dates?

If it's generic, why should it live in math?

~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