Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'explanation': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'iterating': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'wrote:': 0.18; 'header :User-Agent:1': 0.23; 'stopping': 0.24; 'url:edu': 0.26; 'header:X -Complaints-To:1': 0.27; 'chris': 0.29; 'subject:list': 0.30; 'lists?': 0.31; '14,': 0.36; 'behind': 0.37; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'pdf': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'subject:The': 0.64; 'url:pdf': 0.68; 'rebert': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: Newbie: The philosophy behind list indexes Date: Sat, 15 Jun 2013 08:42:48 +0200 Organization: None References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p50848a16.dip0.t-ipconnect.de User-Agent: KNode/4.7.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371278743 news.xs4all.nl 15994 [2001:888:2000:d::a6]:53844 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48257 Chris Rebert wrote: > On Jun 14, 2013 10:26 PM, wrote: >> What is the thinking behind stopping 'one short' when slicing or >> iterating through lists? > I find Dijkstra's explanation rather convincing: > http://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831.html This is the only case where I prefer the pdf ;) http://www.cs.utexas.edu/~EWD/ewd08xx/EWD831.PDF