Re: range(,,)

Ulf Bartelt (stub@pce60.rz.tu-clausthal.de)
Sun, 28 Aug 1994 10:47:39 GMT

Guido.van.Rossum@cwi.nl wrote:
: > Things like range(1,int(pow(x,0.5))) seem unhandy for a language for rapid
: > prototyping and shell programming.
: >
: > Is it possible to loosen the definition of range to something like
: >
: > range(from,to,step) produces a list of integers like
: > for( i=ceil(from); i<floor(to); i+=floor(step))
: >
: > to get a friendlier behaviour ?

: And what would you expect range(100000.0) to return? What if the
: floating point representation is sufficiently fuzzy that this actually
: returns range(100001)?

In the first time I thought, it doesn't matter where a fuzzy floating point
representation crashes my calculation. But I aggree: living with it and
knowing where it definitely will not happen is better then letting the
monster of inaccuracy threaten each line of my code... ;-)

Bye !
Ulf.

--
Ulf Bartelt | 2:2437/120.666@fidonet.org | bartelt@sun2.isaf.tu-clausthal.de
            |                            | stub@linux.rz.tu-clausthal.de