Why Python does *SLICING* the way it does??

Peter Hansen peter at engcorp.com
Wed Apr 20 11:52:45 EDT 2005


Terry Hancock wrote:
> However, I used to make "off by one" errors all the time in both C and Fortran,
> whereas I hardly ever make them in Python.

This should probably be the overriding concern in this
case.

I can't remember the last time I made an off-by-one error
in Python (or, really, whether I ever have), whereas I
can't remember the last C program I wrote which didn't have
one.

> So I like Python's slicing because it "bites *less*" than intervals in C or Fortran.

+1 QOTW



More information about the Python-list mailing list