Questions regarding design decisions in listobject.c

rturpin at my-deja.com rturpin at my-deja.com
Sun Jun 4 23:50:49 EDT 2000


In article <8F49E9873gmcmhypernetcom at 199.171.54.154>,
  gmcm at hypernet.com (Gordon McMillan) wrote:
> I suspect you haven't used many repetitive slicing
> algorithms. It boils down to being nice because
>
>  lst == lst[:x] + lst[x:]

Or to put it another way, the same value serves as
both the end of the previous segment, and the start
of the next. This is really, REALLY useful when
doing list algorithms.

Praising-this-neat-convention-of-Python-ly yrs,
Russell


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list