Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"It's not just a computer -- it's your ass." -- Cal Keegan


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

SubjectAuthor
o Re: Behavior of the for-else constructDan Stromberg

1
Re: Behavior of the for-else construct

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: drsali...@gmail.com (Dan Stromberg)
Newsgroups: comp.lang.python
Subject: Re: Behavior of the for-else construct
Date: Thu, 3 Mar 2022 06:52:33 -0800
Lines: 18
Message-ID: <mailman.118.1646319166.2329.python-list@python.org>
References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
<CAGGBd_p5wRgy1+4Fn=U36qS80rPdnE_AYvGZbOmSn2fSb7hnsA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de D09iX+8QfN3V27p+Se3UigOtJdV74EihVekEQeWbHSFQ==
Return-Path: <drsalists@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=h0Ha6rH4;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.003
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python?': 0.03; '2022':
0.05; 'mar': 0.07; 'cc:addr:python-list': 0.09; 'construct': 0.09;
'cc:name:python list': 0.16; 'from:addr:drsalists': 0.16;
'from:name:dan stromberg': 0.16; 'once.': 0.16;
'received:209.85.217': 0.16; 'sensible': 0.16; 'subject:else':
0.16; 'wrote:': 0.16; 'thu,': 0.19; 'cc:addr:python.org': 0.20;
'issue': 0.21; 'maybe': 0.22; 'cc:2**0': 0.25; "doesn't": 0.32;
'message-id:@mail.gmail.com': 0.32; 'subject:for': 0.33; 'there':
0.33; 'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'received:209.85': 0.37;
'received:209': 0.39; 'use': 0.39; 'block': 0.39; 'want': 0.40;
'here.': 0.61; 'down': 0.64; 'survey': 0.71; 'little': 0.73
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
:cc; bh=3K09W112ppsppL4b81Ga1tITw4LCZgQU8bK/WiUanY0=;
b=h0Ha6rH4O3H1EGC1GsSdRnkf4ZH8NKnIhG+9Ef90RFqX8BvGT0MBDp6RoV9xjATg6Y
1XVh4rt7ZBXJw3YsFkG/ZBU7bXS7+whk3SJO/XWxjjB/aZlTQmpeap+6ZO75KEe5xJk9
GsJ7WdLXtHoEPIJN1Ayt9wS8chipiUXBsVOskihTBhIDEzY2mnZc5mkLn7P2LEZlkqEr
agGoB4c+7YoYL7CyD9PNmOTLHmfpF7R0Z6wDF4fPAE7Lfu4dt30Su4iozsEzAP3D271e
H7IUJjJogz4+sTi3iEYwG1uclwbz9+cS3z246R94ic6DGxJeo3/puexcJEwrm2QrLaSX
s0+A==
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:cc;
bh=3K09W112ppsppL4b81Ga1tITw4LCZgQU8bK/WiUanY0=;
b=O93AotUi3d0T7IFwdIgK+yr7CFUfV+4ZJ4vZbpA1hEqzn+q4hk+EmAeX0L234syyEb
4eYGN+Ce3+UKRZLNfuSNClcTtJs7I6/Xy20/lgvYmGzHpEx6Xtuh93g/GKbsRaZKOsQs
X3XVajQ6+M9gbqGkpy6QNG0A3O8T7HKF7030ZL28UFRl5G8gTd7nBSsqDidP+xzB8oi4
cOO9v6kU41UWYeCG6ahtIG05f4rzCbGP8UX4NNkoeRsi3i01bpeqUzZ6dqYa/3RLZ27r
lR1MjbCfmsoFWft18lh+l9NRTuqxTfyZ9tPGBw62BeiuEMFf7nENF/uxsnfZ68PJDO1V
Mjbw==
X-Gm-Message-State: AOAM5339ast+jEsKqUD2OA/uzNoB7F3QZo3REVq4Dr9pR6+42bmwwxri
C+80nqUUSzwx2QhdPV2MGqgOdp86QhcBybX4bLZGUbWm
X-Google-Smtp-Source: ABdhPJxTOe8Nr8Rp9iTDHMa/IUbOOhT0Db9HwgWNJ/ECBDfHTqX2OxFZPiytq74Uu0rZMZfFQ4cDq2SLDXYqShV5JjY=
X-Received: by 2002:a67:f549:0:b0:320:608d:1d8 with SMTP id
z9-20020a67f549000000b00320608d01d8mr1771482vsn.79.1646319164374; Thu, 03 Mar
2022 06:52:44 -0800 (PST)
In-Reply-To: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
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: <CAGGBd_p5wRgy1+4Fn=U36qS80rPdnE_AYvGZbOmSn2fSb7hnsA@mail.gmail.com>
X-Mailman-Original-References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
 by: Dan Stromberg - Thu, 3 Mar 2022 14:52 UTC

On Thu, Mar 3, 2022 at 5:24 AM computermaster360 <
computermaster360@gmail.com> wrote:

> I want to make a little survey here.
>
> Do you find the for-else construct useful? Have you used it in
> practice? Do you even know how it works, or that there is such a thing
> in Python?
>
> I have used it maybe once. My issue with this construct is that
> calling the second block `else` doesn't make sense; a much more
> sensible name would be `then`.
>

I use it and like it.

You need break's to make it useful - then it cuts down on unnecessary
booleans.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor