[Python-Dev] range objects in 3.x

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Sep 27 08:23:41 CEST 2011


Guido van Rossum wrote:
> Or, maybe what I'm trying to say is, if the
> user has start/end/count but the API wants start/step/count, after
> computing step = (end-start) / count, the value of start + count*step
> might not quite equal to end; whereas if the user has start/step/count
> but the API wants start/end/count I think there's nothing wrong with
> computing end = start + step*count.

+1, that makes sense to me.

And I don't like "linspace" either. Something more self
explanatory such as "subdivide" or "interpolate" might
be better.

-- 
Greg



More information about the Python-Dev mailing list