Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If the facts don't fit the theory, change the facts. -- Albert Einstein


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

SubjectAuthor
o Re: Behavior of the for-else constructChris Angelico

1
Re: Behavior of the for-else construct

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: Behavior of the for-else construct
Date: Sat, 5 Mar 2022 10:31:20 +1100
Lines: 32
Message-ID: <mailman.181.1646436693.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>
<CAPTjJmo_n9xbSWT=Met=sfZPzCRB0JFLSf=8XG5wA=4xtzjo0g@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de 0FbwNUy7qYMQgRu/rdbwegkntkc7D1ZzOf6YwFbpb0bQ==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=qpuGfwqa;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '2022': 0.05;
'programming.': 0.05; 'else.': 0.07; 'mar': 0.07; 'used.': 0.07;
'angelico': 0.09; 'confusing,': 0.09; 'rarely': 0.09; 'syntax':
0.15; '+1100,': 0.16; '[1]:': 0.16; 'avi': 0.16; 'chrisa': 0.16;
'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16;
'gross': 0.16; 'handful': 0.16; 'holzer': 0.16; 'subject:else':
0.16; 'useful.': 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; 'sat,': 0.22; 'idea': 0.24; 'do,': 0.26;
'else': 0.27; 'chris': 0.28; 'it,': 0.29; 'think': 0.32;
"doesn't": 0.32; 'context': 0.32; 'programmers': 0.32; 'python-
list': 0.32; 'message-id:@mail.gmail.com': 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; 'received:google.com':
0.34; 'from:addr:gmail.com': 0.35; 'people': 0.36; 'those': 0.36;
"it's": 0.37; 'received:209.85': 0.37; 'means': 0.38;
'received:209': 0.39; 'two': 0.39; 'use': 0.39; 'something': 0.40;
'search': 0.61; 'week': 0.61; 'skip:o 10': 0.61; 'tool': 0.65;
'years': 0.65; 'types': 0.67; 'matter': 0.68; 'ever.': 0.69;
'perfectly': 0.69; 'times': 0.69; 'hearing': 0.75; 'features':
0.75; 'supposed': 0.76; 'und': 0.76; 'incorrect': 0.84;
'speaking,': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=et+kFD7DJHtET6mq68AXUpYgKL/AZtSn70vbUBNBeRg=;
b=qpuGfwqaDyZd5RyHbLdaMyxKucOIdXBeiWWiaXCp12xwkg6PURYShcVMDJyfsy5u93
hLIw3y/ZeXxOasbLOg3/E4iXgLp8abRGklf5l2u5rNaUiYhLifXrk6u4u5Amr2eBVhiM
kbJq7dhThKqLLeNgvQDCj7/4cor1zvFHilUetAy/xxD+NjAH8ip4T6pMnoBWLbIqc69p
yN7TSxgWpk5YmrNOkREaNPXZ9o+TdwpjZUv6GoUMup599IinfcVAtbW+XDHStf/CI6kP
/I/So/RIDztK/Z0Vwhqwt2s4vDvMtqfMG93wgRsUKrd3dPrglWh05tmXuXIwsRsXE44/
lC5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=et+kFD7DJHtET6mq68AXUpYgKL/AZtSn70vbUBNBeRg=;
b=uLK+xMGITHRsEf+4YAlH7ulqrIf47d+TGHr+d6WIhJNTgbZ5Xj+ISG20WBzIx8dYUI
8iU4jWv8GCRcjAxvvVPnLdGcwnt3KGnPMLMsAZlMlMEYRJ6ShhtE9aIn++KjZ4n1vN0H
92atPeCeOsSToNvaCc/8buKdkKpez6YOVSG6n4w4ALJ9rdDihUie3/kBR4t7nt4f4SuW
aUDl1CJcSGeZ9t3fvZfQrL5PL+g3WLcvnzJyH8hftGApapZWGeHYjFT7aDdt0C8K4Mgb
7ZWOrgAUJ7sYH9FGqxEYftl0UwMb6y/hl/bMtDkLVVy/YBGP1gwrApgbGry7eUZrJLTZ
mKCw==
X-Gm-Message-State: AOAM532GEG4rHCLj6it/JDM8ShnVQPaB1dVzVEowC3aOvgRD4hMdve/B
2ebVEOqKzMZ0+fcRNHb/r1W4ilwF6QqZA4aGMqrgHTQk
X-Google-Smtp-Source: ABdhPJwkaQCVnrgrxuySxE7A9HA7kBiFObx9l4xlScam5Cmy4BPPUQq64U5LdLcKw6OFzPJ4bDKul/7plbScyvvzZlE=
X-Received: by 2002:adf:db43:0:b0:1ef:7195:43cd with SMTP id
f3-20020adfdb43000000b001ef719543cdmr671477wrj.495.1646436692090; Fri, 04 Mar
2022 15:31:32 -0800 (PST)
In-Reply-To: <20220304232544.mcbhet7wn2wa2k2r@hjp.at>
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: <CAPTjJmo_n9xbSWT=Met=sfZPzCRB0JFLSf=8XG5wA=4xtzjo0g@mail.gmail.com>
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>
<20220304232544.mcbhet7wn2wa2k2r@hjp.at>
 by: Chris Angelico - Fri, 4 Mar 2022 23:31 UTC

On Sat, 5 Mar 2022 at 10:28, Peter J. Holzer <hjp-python@hjp.at> wrote:
>
> 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.
>

Part of group 1. It doesn't matter how often or rarely you use the
feature; there are a LOT of features of Python that I use only
occasionally, if ever. But as long as you know how to use it, it's
there when you need it.

ChrisA

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor