Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Software is like sex; it's better when it's free. -- Linus Torvalds


devel / comp.lang.python / Re: Behavior of the for-else construct

SubjectAuthor
o Re: Behavior of the for-else constructPeter J. Holzer

1
Re: Behavior of the for-else construct

<mailman.180.1646436346.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17367&group=comp.lang.python#17367

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: Behavior of the for-else construct
Date: Sat, 5 Mar 2022 00:25:44 +0100
Lines: 58
Message-ID: <mailman.180.1646436346.2329.python-list@python.org>
References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
<YiFCPlGC+2aRIR0K@shallowsky.com>
<21739669.459456.1646348879560@mail.yahoo.com>
<CAPTjJmoXyHF_N1E2KFZ+YZmZ8+zm4E_Pra_hbXLHWuNs1XtiBQ@mail.gmail.com>
<20220304232544.mcbhet7wn2wa2k2r@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="on3mgvsmajzx4xd7"
X-Trace: news.uni-berlin.de DtT+ZDtBFpUwELXX6FjGmQ4Q456JMG/IiCPQmcTt3ySg==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '2022': 0.05; 'content-
type:multipart/signed': 0.05; 'programming.': 0.05; 'else.': 0.07;
'mar': 0.07; 'used.': 0.07; 'angelico': 0.09; 'confusing,': 0.09;
'content-type:application/pgp-signature': 0.09; 'filename:fname
piece:asc': 0.09; 'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; 'rarely': 0.09; 'syntax':
0.15; '"creative': 0.16; '+1100,': 0.16; '[1]:': 0.16; '__/':
0.16; 'avi': 0.16; 'challenge!"': 0.16; 'from:addr:hjp-python':
0.16; 'from:addr:hjp.at': 0.16; 'from:name:peter j. holzer': 0.16;
'gross': 0.16; 'handful': 0.16; 'hjp@hjp.at': 0.16; 'holzer':
0.16; 'reality.': 0.16; 'stross,': 0.16; 'subject:else': 0.16;
'url-ip:212.17.106.137/32': 0.16; 'url-ip:212.17.106/24': 0.16;
'url-ip:212.17/16': 0.16; 'url:hjp': 0.16; 'useful.': 0.16;
'|_|_)': 0.16; 'wrote:': 0.16; 'python': 0.16; 'code.': 0.17;
'probably': 0.17; "can't": 0.17; 'to:addr:python-list': 0.20;
'fri,': 0.22; 'idea': 0.24; 'do,': 0.26; 'else': 0.27; 'chris':
0.28; 'sense': 0.28; 'it,': 0.29; 'think': 0.32; 'context': 0.32;
'programmers': 0.32; 'python-list': 0.32; 'but': 0.32; "i'm":
0.33; 'subject:for': 0.33; 'there': 0.33; 'script': 0.33; 'same':
0.34; 'header:In-Reply-To:1': 0.34; 'people': 0.36; 'those': 0.36;
'means': 0.38; 'two': 0.39; 'something': 0.40; 'search': 0.61;
'week': 0.61; 'received:212': 0.62; 'tool': 0.65; 'years': 0.65;
'received:userid': 0.66; 'types': 0.67; 'perfectly': 0.69; 'url-
ip:212/8': 0.69; 'times': 0.69; 'hearing': 0.75; 'supposed': 0.76;
'und': 0.76; 'incorrect': 0.84; 'received:at': 0.84; 'speaking,':
0.84
Content-Disposition: inline
In-Reply-To: <CAPTjJmoXyHF_N1E2KFZ+YZmZ8+zm4E_Pra_hbXLHWuNs1XtiBQ@mail.gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://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: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20220304232544.mcbhet7wn2wa2k2r@hjp.at>
X-Mailman-Original-References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
<YiFCPlGC+2aRIR0K@shallowsky.com>
<21739669.459456.1646348879560@mail.yahoo.com>
<CAPTjJmoXyHF_N1E2KFZ+YZmZ8+zm4E_Pra_hbXLHWuNs1XtiBQ@mail.gmail.com>
 by: Peter J. Holzer - Fri, 4 Mar 2022 23:25 UTC
Attachments: signature.asc (application/pgp-signature)

On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
> <python-list@python.org> wrote:
> > The drumbeat I keep hearing is that some people hear/see the same
> > word as implying something else. ELSE is ambiguous in the context it
> > is used.
>
> What I'm hearing is that there are, broadly speaking, two types of
> programmers [1]:
>
> 1) Those who think about "for-else" as a search tool and perfectly
> understand how it behaves
> 2) Those who have an incorrect idea about what for-else is supposed to
> do, don't understand it, and don't like it.

3) Those who understand what it does und don't even find it*s syntax
very confusing, yet only very rarely find it useful.

I have probably used it a handful of times in 8 years of Python
programming. Coincidentally, I think I used it just this week - but I
can't find it any more which probably means that it was either in a
throwaway script or I have since rewritten the code.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)
1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor