[Python-Dev] range objects in 3.x

Steven D'Aprano steve at pearwood.info
Tue Sep 27 18:00:15 CEST 2011


Alexander Belopolsky wrote:
> On Tue, Sep 27, 2011 at 2:23 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> ..
>> And I don't like "linspace" either. Something more self
>> explanatory such as "subdivide" or "interpolate" might
>> be better.
> 
> "Grid" would be nice and short, but may suggest 2-dimentional result.
>  Whatever word we choose, I think it should be a noun rather than a
> verb.  ("Comb" (noun) brings up the right image, but is probably too
> informal  and may be confused with a short for "combination.")

I came up with "spread".

Here's my second attempt, which offers both count/start/end and 
count/start/step APIs:

http://code.activestate.com/recipes/577881-equally-spaced-floats-part-2/




-- 
Steven



More information about the Python-Dev mailing list