From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10081 invoked from network); 23 Nov 2020 06:18:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Nov 2020 06:18:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1606112324; b=Hj6aAZfDI+7XvvmJ7Yx1bDiW9ydScXl/itIgZY9fqGpS27Zv5PKNvwKccYKBPGDt98u6VCROJS iss8gOWwoMieVTgCaGmgTQyGkj2ucxNWMgjU0gXORGGgIANVffL8AMiNI7UeLDxACYW6IW33YJ oID4gKqLEQy5NWG7BYR2L6UbNkh5d5a3yOEPtx7PqdLUO2+fLaOkXNf+cDYQ7WdqnZGmdmGvjD 4ncwJB9uikJSV3lO7UPRUNG3kotdCXzH69KE8n2mGSEbVMr43Gxv1amIrXDbOwNartT8ODO98M 0Gw+japhvRDsNps45Dwm2ZWuCkh+rKidfi0+tSyULW7RdA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wr1-f54.google.com) smtp.remote-ip=209.85.221.54; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1606112324; bh=+SNa2fafsvxK6cOVR80cEFAMEV/UJ298mAwcro7eWFY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=tTeHI+3TogrBvTbaNpjgZGG3Hkd/DNcPS+34zowK54N8Gy0Ltav2Wt3PkSVQVwbPPI5zajzA6a /Z6Z8jwkCk23PBIxAuSV5z2yWu0ByReeHBteFeogBvOnf1AtiFQ5cnMa9eaA7Q+bn5rM+En7rB AeM2ReEpDW46CzB1QI6fPRFbLn+faEYATiG4VajrhVY+6MsKk/p9CpDyUr8BwNprfMQjeej4SR fBuNCMW/xBl0z89IndcNWjMhjr20e9N5zR0179PiNyk76zOG7Q7KfGcISSJRr2S0zHh/LuPztM MjUEc8bb/ii0i2elI8MuRwcDM8IiP7mZ53KNAYwe9s+F8w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=/iSYDBnVtUE+0i4/e2s83qV+QY81BtKaTp87Ytjdf3I=; b=MY2zXCh4dJb/bKM0sxJSGGutpd wpFlW8Vbo8uebcl5OB1UtLDEqrF3lA5y+jdCqK9+1cp6vwYBGZSMqiYeLXyNrSfvpQETnj+98l2HA 8PIrY/nlK1onA7nGwW5kwWZhEd3493VnvFViW89Zxbs6BeIswVcq7M4GOK3qZHKxEhjl+qTuJ58Ao bP8iZboUFKxg2flkm4M/WXR3lgxwXpTs4Aj9LtUAGQgAto5+vV0zVDp6bA+RdCo12172yY630tONt wPptvCrTSFM2agpspsXc63DNmFIwBRKzrKA560ctrkxZqWjr+fJcyazOMPLJgFrP5DegWDDTigB9X wEEXX1LA==; Received: from authenticated user by zero.zsh.org with local id 1kh5BO-00004K-VR; Mon, 23 Nov 2020 06:18:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wr1-f54.google.com) smtp.remote-ip=209.85.221.54; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wr1-f54.google.com ([209.85.221.54]:35107) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kh5B2-000PtQ-Nk; Mon, 23 Nov 2020 06:18:18 +0000 Received: by mail-wr1-f54.google.com with SMTP id k2so17457638wrx.2 for ; Sun, 22 Nov 2020 22:18:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/iSYDBnVtUE+0i4/e2s83qV+QY81BtKaTp87Ytjdf3I=; b=HYMfOJIYiEl49CcyT2IDi/xurq49RxOE9l4YSUIvHNnyGYBdAa4QIGeUb6KRESi/DK DDvKsOCqy7cBxvFCuWxiyjIxJhIOyF339NcAgTzrQ0nNcl7ARjscq4wjdwahzeYmErAP WSgGAIhkbu/asYvEBM9F3Z3wH6c/2dUwLU8cqytO4F5pIN6m57uwTvwTizsV6AaQHZpB BX0hfEeruYhy+TzyIjutYsFxxcmX7xRfu3bASSs8q9eCbvakKT/0rwUHYYwcwTeDsyQQ KZ+JiZybR8FrBmucYLEa7makMB/+0Io5KiiFTrm4LFLK6T0PtsENEPLuUUnavlOVIFE7 6Ywg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/iSYDBnVtUE+0i4/e2s83qV+QY81BtKaTp87Ytjdf3I=; b=KpWmV+P04OAPkKGZc27XQZKtvkfOiT0DFD/mBrglUyUcwdeyHVTF0R88VjMawdKo9g VMQsvmIHzQSzq6NVRkptOhntQWrqPJd11+AV3PdGCtORZXx4Y11whdMB6PdA2qlp2DbQ zMXmdOI/kCHZpL7Wo9UnnTJo5bakpIR01aTVAyJbe0C2vibBHUhp8iuMUM276At+Yxfm m0lJhLJSpPr8487oVrpaLlP58292/vAh8LaetzoK3+l1vAsM2ncSLlxpw4CrDvScLSoE 739LWvZPewlCO5vXY40DDb2ADNouDt2ieOhNVpA5UAq2viHB6bRTMYyxi3IkMyhiVw2F BpCg== X-Gm-Message-State: AOAM532gW8X8vvLogVzeige0gINLZ4QgZs4BiAEPPLlfCrNv0u2pgEsp C+Ry0mA8Qv3AWxoF5jDpgt3Dp/jdP6FDvHnPeLY= X-Google-Smtp-Source: ABdhPJxSr9C0TkjDwZT6dnIRW41+wvW7iceX3xY4crHv/xAZSEAr8oJ/u5ac3e1Z3Rs/IDvwhZpwUvpMRp8qBOoml90= X-Received: by 2002:a5d:52c1:: with SMTP id r1mr30534361wrv.255.1606112296132; Sun, 22 Nov 2020 22:18:16 -0800 (PST) MIME-Version: 1.0 References: <20201118224532.769efe4d@tarpaulin.shahaf.local2> <20201123040003.GB9114@tarpaulin.shahaf.local2> In-Reply-To: <20201123040003.GB9114@tarpaulin.shahaf.local2> From: Felipe Contreras Date: Mon, 23 Nov 2020 00:18:05 -0600 Message-ID: Subject: Re: Bug with unset variables To: Daniel Shahaf Cc: Roman Perepelitsa , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 47601 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Sun, Nov 22, 2020 at 10:00 PM Daniel Shahaf wro= te: > > Felipe Contreras wrote on Sat, Nov 21, 2020 at 19:20:56 -0600: > > On Wed, Nov 18, 2020 at 4:45 PM Daniel Shahaf = wrote: > > > > > Do not argue about a person. Argue about the technical matter at han= d. > > > > That's what I did. The technical matter was being ignored. > > > > > What are A and B? > > > > I already explained this multiple times: > > > > A: unset foo > > B: foo =3D nil > > And in Python, A is =C2=ABdel foo=C2=BB; B is =C2=ABfoo =3D None=C2=BB; a= nd they aren't > equivalent. Actually, more precisely, Python doesn't even *have* a B, > because Python doesn't have a syntax for declaring a variable without > a value. (When you write =C2=ABfoo =3D None=C2=BB, that =C2=ABNone=C2=BB= is not implicitly > provided by the language.) Are your A and B functionally the same? No. Are my A and B functionally the same? Yes. Those are undeniable facts. > However, I don't see how any of this is an argument in favour of the > behaviour change you proposed. Other languages' behaviours be what they > may, they're unlikely to be a good enough reason to break backwards > compatibility. (For instance, I don't think a proposal to disable null > elision would be accepted, due to backwards compatibility concerns, > regardless of how few other languages do null elision.) I made the claim and I've substantiated it. Others disagreed with the claim, and argued against it. If you don't see how the fact that virtually all languages do the same thing as Bash and ksh is relevant, then don't argue against the claim. But my claim still stands. > > > Why does the Python example not use =C2=ABdel=C2=BB as the "unset" op= eration? > > > > Because it doesn't do the same thing as unset. > > > > In shell, this leaves foo declared in a local scope: > > > > local foo # declare > > unset foo # unset > > > > In Python, this doesn't: > > > > foo =3D None # declare > > del foo # undeclare > > > > They are *not* functionally the same thing. > > In Python, the "declare" operation would be just =C2=ABpass=C2=BB, or mor= e > precisely, the removal of any =C2=ABglobal foo=C2=BB declarations=E2=80= =A6 but, again, > unless this Python discussion somehow bears on a proposed change to zsh, > I'm not interested in continuing it. No. That's not how you declare local variables in Python. If you are not interested in continuing it then don't argue against it. Either argue against my claim or don't, but you can't have your cake and eat it too. Cheers. --=20 Felipe Contreras