Slice confusion : a[n:p] is a list exclude the last element p

andrew cooke andrew at
Mon Apr 28 18:46:51 CEST 2003

Alex Martelli said:
> It's an important design principle, which I first saw proposed in print
> by Andrew Koenig in his landmark book "C Traps and Pitfalls": *all bounded
> loops should be first-bound-included, last-bound-excluded* -- and which I
> will therefore call "Koenig's Principle" although I have never seen the

hmmm.  also appeared in his "ruminations on c++".  is there a subset of
his books that covers all his wisdom? ;o)



More information about the Python-list mailing list