Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Irrationality is the square root of all evil" -- Douglas Hofstadter


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

SubjectAuthor
o Re: Behavior of the for-else constructAkkana Peck

1
Re: Behavior of the for-else construct

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: akk...@shallowsky.com (Akkana Peck)
Newsgroups: comp.lang.python
Subject: Re: Behavior of the for-else construct
Date: Thu, 3 Mar 2022 15:33:34 -0700
Lines: 24
Message-ID: <mailman.135.1646347427.2329.python-list@python.org>
References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
<YiFCPlGC+2aRIR0K@shallowsky.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.uni-berlin.de eP08M661MyNITQ4nHMpp4A2g5Xi+2Gre6DzsfBz1LMkQ==
Return-Path: <akkana@shallowsky.com>
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.058
X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'python?': 0.03;
'construct': 0.09; 'ended': 0.09; 'readable': 0.09; 'writes:':
0.09; 'does,': 0.16; 'flow.': 0.16; 'received:71': 0.16;
'subject:else': 0.16; 'to:addr:python-list': 0.20; 'code': 0.23;
'anyone': 0.25; 'it,': 0.29; 'header:User-Agent:1': 0.30; 'code,':
0.31; "doesn't": 0.32; "wouldn't": 0.32; 'but': 0.32;
'subject:for': 0.33; 'there': 0.33; "didn't": 0.34; 'header:In-
Reply-To:1': 0.34; 'hard': 0.37; 'means': 0.38; 'quite': 0.39;
'use': 0.39; 'still': 0.40; 'difficult': 0.40; 'something': 0.40;
'want': 0.40; 'here.': 0.61; 'once': 0.63; 'look': 0.65; 'worked':
0.67; 'survey': 0.71; 'little': 0.73; 'up,': 0.84; 'implies':
0.84; 'mind,': 0.93
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
User-Agent: Mutt/2.1.4 (2021-12-11)
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: <YiFCPlGC+2aRIR0K@shallowsky.com>
X-Mailman-Original-References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
 by: Akkana Peck - Thu, 3 Mar 2022 22:33 UTC

computermaster360 writes:
> I want to make a little survey here.
>
> Do you find the for-else construct useful?

No.

> Have you used it in practice?

Once or twice, but ended up removing it, see below.

> Do you even know how it works, or that there is such a thing in Python?

I always have to look it up, because to my mind, "else" implies
it does something quite different from what it actually does.

Which means that even if I worked hard at memorizing what it does,
so I didn't have to look it up, I still wouldn't use it in code,
because I want my code to be easily readable (including by future-me).
for..else makes code difficult to understand by anyone who doesn't
use for..else frequently: they might be misled into misunderstanding
the control flow.

...Akkana

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor