Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20816
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <arnodel@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.021 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'subject:when': 0.07; 'executes': 0.09; 'received:209.85.214.174': 0.13; 'else"': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.21; 'header:In- Reply-To:1': 0.22; 'clause': 0.23; 'cc:2**0': 0.26; 'message- id:@mail.gmail.com': 0.29; 'cc:addr:python.org': 0.29; 'construct': 0.30; 'break': 0.32; 'loop': 0.34; 'steven': 0.34; 'rather': 0.34; 'subject:/': 0.34; 'received:209.85.214': 0.36; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'useful': 0.38; 'think': 0.38; 'should': 0.38; 'received:209': 0.39; 'header:Received:6': 0.61; 'stop': 0.61; '"for': 0.67 |
| Received-SPF | pass (google.com: domain of arnodel@gmail.com designates 10.182.8.69 as permitted sender) client-ip=10.182.8.69; |
| Authentication-Results | mr.google.com; spf=pass (google.com: domain of arnodel@gmail.com designates 10.182.8.69 as permitted sender) smtp.mail=arnodel@gmail.com; dkim=pass header.i=arnodel@gmail.com |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ibkTIs1DQn5LNdH3ySNTi+hAHsdMO0Vh/QUYvnMcl9A=; b=xjs3Tjf4QX+yJhxdEw03YOK6leIe9DkoYOw+tJbZx/Zz4kYsbP2K4FfhcoWFHMya9K 4MLaOgKpGiOSY6SqjlU/+ZvPVzUpmz+77JknwwLcmyDW3BZuGPPeTk/RJ4NHfcgA1X5J cC6teKengfor5poI+DE0wlo84m7ViIT3joWKU= |
| MIME-Version | 1.0 |
| In-Reply-To | <4f47a49e$0$29989$c3e8da3$5496439d@news.astraweb.com> |
| References | <14ba4b39-4066-4d24-89d7-3c7c85aab85c@b18g2000vbz.googlegroups.com> <51a08251-1e6e-45f3-8531-b53e87b7db8b@r1g2000yqk.googlegroups.com> <ji80lm$rtc$1@solani.org> <4f47a49e$0$29989$c3e8da3$5496439d@news.astraweb.com> |
| Date | Fri, 24 Feb 2012 15:00:16 +0000 |
| Subject | Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty |
| From | Arnaud Delobelle <arnodel@gmail.com> |
| To | "Steven D'Aprano" <steve+comp.lang.python@pearwood.info> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.128.1330095619.3037.python-list@python.org> (permalink) |
| Lines | 12 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1330095619 news.xs4all.nl 6851 [2001:888:2000:d::a6]:32980 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:20816 |
Show key headers only | View raw
On 24 February 2012 14:54, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > for...else is a very useful construct, but the name is misleading. It > took me a long time to stop thinking that the else clause executes when > the for loop was empty. This is why I think we should call this construct "for / break / else" rather than "for / else". -- Arnaud
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Alex Willmer <alex@moreati.org.uk> - 2012-02-23 16:30 -0800
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-24 01:08 +0000
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Ethan Furman <ethan@stoneleaf.us> - 2012-02-23 19:49 -0800
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-02-24 07:10 +0000
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Peter Otten <__peter__@web.de> - 2012-02-24 09:44 +0100
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Paul Rubin <no.email@nospam.invalid> - 2012-02-23 17:21 -0800
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Rick Johnson <rantingrickjohnson@gmail.com> - 2012-02-24 04:32 -0800
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Peter Otten <__peter__@web.de> - 2012-02-24 13:44 +0100
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Peter Otten <__peter__@web.de> - 2012-02-24 14:14 +0100
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-24 14:54 +0000
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Arnaud Delobelle <arnodel@gmail.com> - 2012-02-24 15:00 +0000
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Peter Otten <__peter__@web.de> - 2012-02-24 16:16 +0100
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Rick Johnson <rantingrickjohnson@gmail.com> - 2012-02-28 14:56 -0800
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Chris Angelico <rosuav@gmail.com> - 2012-02-29 10:24 +1100
Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-29 00:18 +0000
csiph-web