Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Real Programmers don't eat quiche. They eat Twinkies and Szechwan food.


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.150.1646364203.2329.python-list@python.org>

  copy mid

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

  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: Fri, 4 Mar 2022 14:23:09 +1100
Lines: 33
Message-ID: <mailman.150.1646364203.2329.python-list@python.org>
References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
<YiFCPlGC+2aRIR0K@shallowsky.com>
<21739669.459456.1646348879560@mail.yahoo.com>
<e3544242-cd54-05d3-2101-5b9fedc1c13e@btinternet.com>
<621325684.471007.1646354302946@mail.yahoo.com>
<77101e25-a341-ee34-ab6b-abc60f858430@btinternet.com>
<459805806.495251.1646362934339@mail.yahoo.com>
<CAPTjJmrNQ2MYY2F+_YXv_kDDzfeHNd5y17d6yQG0rt7eCXtfsg@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de kwAFeKYJR1uWq8QTeFzCegmBY4fji+dFArTAoQI9bOAg==
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=LYU6hNRu;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.024
X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; '2022': 0.05; 'is.': 0.05;
'mar': 0.07; 'construct': 0.09; 'ended': 0.09; 'fact,': 0.09;
'\xe2\x86\x92': 0.09; 'that.': 0.15; 'avi': 0.16; 'chrisa': 0.16;
'follows': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris
angelico': 0.16; 'gross': 0.16; 'sounds': 0.16; 'subject:else':
0.16; 'symbol': 0.16; 'why)': 0.16; 'wrote:': 0.16; 'python':
0.16; 'uses': 0.19; 'to:addr:python-list': 0.20; 'language': 0.21;
'fri,': 0.22; 'maybe': 0.22; 'way.': 0.22; 'to:name:python-
list@python.org': 0.24; 'seems': 0.26; 'chris': 0.28; 'expect':
0.28; 'whole': 0.30; 'think': 0.32; 'empty': 0.32; 'here,': 0.32;
'objects': 0.32; 'python-list': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'but': 0.32; 'subject:for': 0.33;
'hold': 0.33; 'mean': 0.34; 'requires': 0.34; 'header:In-Reply-
To:1': 0.34; 'received:google.com': 0.34; 'from:addr:gmail.com':
0.35; 'using': 0.37; 'received:209.85': 0.37; 'hard': 0.37; 'way':
0.38; 'could': 0.38; 'read': 0.38; 'received:209': 0.39;
'changes': 0.39; 'least': 0.39; 'single': 0.39; 'mentioned': 0.39;
'use': 0.39; 'something': 0.40; 'reasonable': 0.62; 'everything':
0.63; 'your': 0.64; 'let': 0.66; 'right': 0.68; 'exactly': 0.68;
'tough': 0.69; 'easy': 0.74; 'implemented': 0.76; 'reasons': 0.84;
'characters': 0.84; 'interpreters': 0.84; 'pairs': 0.84; 'pause':
0.84; 'pointing': 0.84; 'doing.': 0.91; 'holds': 0.91; 'newly':
0.93
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
:content-transfer-encoding;
bh=HUgeGWPYzfYGReJFh4WflohoZ81joQMdsWilidkt2WQ=;
b=LYU6hNRuWzbHVquAJ905ubmM1vDC4oajTjvjs1w2vEnTBmGZz6xsuVB52RB4OB0VHH
eNvv1VAOsMfCaRtWgUOsDKfPyhi4sVsVabtFU7Q3ecyaD6y9FJF2naU8ggibBBQBmly8
Zct8Tq00npaCF3qqIMLgl6nd2pi5hV21lnPO+B6I5C0theWHjA4RHSq0KCx5sdKJe8Bu
MQw+sPTxzLgynwsYvhUOPDDrxwCCmei3FOQPIVJ/IdqHs43wxHME+BxcCA/Zmunk8Rlv
AVdYu1/OR9ia63EnMrwRH/4QQtN9NgiLX6zPeOJynVvnwpRs4+YWaLIw1TTFhlVghj6i
q3HA==
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:content-transfer-encoding;
bh=HUgeGWPYzfYGReJFh4WflohoZ81joQMdsWilidkt2WQ=;
b=UDSIYfCv2zpgffBQZe910Ks0XfAFQCTHnGFWjTylytJYHIYxdXGtY4niZjvbbb/Q6d
pYIGhr4VU0issrMWKCqkz8LL9txMuROLEtkxuN3NQNNxDJVOqmgBqhuM8P1EJDghRXf/
rJS1888Fcro1hwzPSH1QNKXiqK+iesdustGZALPf50+jmzYHzmfk7r1+Wnel84BdcGFi
3u3x2KbdCGza0umytwUm4C8V/ASHKESdL/vnHPlwq6UKKcSJzT0Urd29mO2IEexIRmYg
aVa087Wd61YLTQBHylrta1FG5vddByjaTxgEPAhnacBdk4/Tjx37g30kZL5ab2yAtqyi
Wrpg==
X-Gm-Message-State: AOAM530wyHSQdnL6S+YRFCmkjXrRFlTIQN0Y19bySIIDDxvOOhLQAs5B
AxajKub8nxAZhtw2MS3dtwT1Atzy0fGgtgo/CXeXRJT/
X-Google-Smtp-Source: ABdhPJwC8IYGbMAvtzcinw9a1DYHRHGMqLCwPCFP5MMG91qx5uu56qjOy5/rTJqVP47eftdTqwWNmKCjb80fXcvO2dE=
X-Received: by 2002:a5d:6047:0:b0:1ea:9a8a:9542 with SMTP id
j7-20020a5d6047000000b001ea9a8a9542mr27899197wrt.243.1646364200646; Thu, 03
Mar 2022 19:23:20 -0800 (PST)
In-Reply-To: <459805806.495251.1646362934339@mail.yahoo.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: <CAPTjJmrNQ2MYY2F+_YXv_kDDzfeHNd5y17d6yQG0rt7eCXtfsg@mail.gmail.com>
X-Mailman-Original-References: <CALq4Z0-fJk-HOu0ka2kPrOioPYAh3e3zbziwetUDmAAx1U1LMw@mail.gmail.com>
<YiFCPlGC+2aRIR0K@shallowsky.com>
<21739669.459456.1646348879560@mail.yahoo.com>
<e3544242-cd54-05d3-2101-5b9fedc1c13e@btinternet.com>
<621325684.471007.1646354302946@mail.yahoo.com>
<77101e25-a341-ee34-ab6b-abc60f858430@btinternet.com>
<459805806.495251.1646362934339@mail.yahoo.com>
 by: Chris Angelico - Fri, 4 Mar 2022 03:23 UTC

On Fri, 4 Mar 2022 at 14:05, Avi Gross via Python-list
<python-list@python.org> wrote:
> To answer something Chris said and was also mentioned here, I do not consider language design to be easy let alone implementing it. Not at all. BUT I think some changes can be straightforward. Having a symbol like a curly brace mean three new things may be tough to implement. Allowing a new symbol in an expanded set of characters seems more straightforward.
>
> Consider an arrow symbol → pointing to the right and another pointing the other way. Could we add the symbol to the language as a single character, albeit implemented using multiple bytes? If my editor let me insert the darn thing, it might then be a reasonable use for some construct in the language unique and new. Maybe the language would use the notation to hold objects holding a set and not confuse the notations for sets and dictionaries as Python ended up doing. (Yes, I know it is NOT confusing in some ways as one holds key:value pairs and the other just value, but making an empty set now requires the notation of set() while an empty dictionary is {} right?
>
> So how hard is it for a newly designed language to recognize any use of one arrow and expect everything up to the next arrow (pointing back) to be the contents of a set? It sounds a tad easier than now when Python interpreters have to pause when they see an open bracket and read what follows to see if everything beyond uses dictionary notation before it decides.
>
> But NO, I am not volunteering to do any of that.

That is exactly why (well, one of the reasons why) I recommended going
the whole way and designing a language in full. You will know exactly
how hard it actually is. In fact, "pause when they see an open
bracket" is the least of your worries :)

ChrisA

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor