[Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more..

Christopher A. Craig com-nospam at ccraig.org
Mon Jan 5 13:08:22 EST 2004


"Kirby Urner" <urnerk at qwest.net> writes:

> > No, though 'c' lies 2cm from the beginning, it does not fall between 0
> > and 2cm because if you stop at 2cm you haven't yet passed it (since
> > we're imagining each item being 1cm wide and it lies between 2cm and
> > 3cm).
> > 
> > 0 a 1 b 2 c 3 d 4 e 5
> > 
> 
> I think of it somewhat differently then.  I think of [0:3] as similar to
> range(0,3) which means [0,1,2] i.e. the 3 is not included.
> 
> If we go  [mylist(i) for i in range(0,3)], we get the same as
> mylist[0:3].

That doesn't end with differing effect.  [0:3] would still be the
first three items in my example (and thus the same as range(0,3)

-- 
Christopher A. Craig <com-nospam at ccraig.org>
"Microprocessors cost $700 -- far too much for a tiny slice of refined,
 impurity-laced beach sand." Steve Gibson




More information about the Edu-sig mailing list