Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Research is to see what everybody else has seen, and think what nobody else has thought.


devel / comp.lang.python / Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

SubjectAuthor
o Re: Variable scope inside and outside functions - global statement being overridAlan Gauld

1
Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: learn2program@gmail.com (Alan Gauld)
Newsgroups: comp.lang.python
Subject: Re: Variable scope inside and outside functions - global statement
being overridden by assignation unless preceded by reference
Date: Wed, 6 Mar 2024 10:59:38 +0000
Lines: 20
Message-ID: <mailman.39.1709722783.3452.python-list@python.org>
References: <aff560df-2f57-47d9-ad81-74c21960c21d@gmail.com>
<ZeeMgL/4hFh/XDJz@cskk.homeip.net> <4Tq9fJ0qN7znVFY@mail.python.org>
<d12bdeb5-8049-44b3-858e-e874cabbbc4e@yahoo.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 0w98ca9pr+GWXtaHhRrCJgA5nO+VRMcmH0/lz7A/E6dg==
Cancel-Lock: sha1:QGxDEGn7LEHYqaUGL3qajxH/cD8= sha256:PxjeJtnChveKPENaDV5zN0sWKyD1MudRc20Xm9MBF/Y=
Return-Path: <learn2program@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=loAZVkux;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.020
X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'searching': 0.05;
'flickr': 0.16; 'from:name:alan gauld': 0.16; 'listings,': 0.16;
'message-id:@yahoo.co.uk': 0.16; 'photo-blog': 0.16;
'subject:being': 0.16; 'subject:reference': 0.16; 'url-
ip:79.170.44.132/32': 0.16; 'url-ip:79.170.44/24': 0.16; 'url-
ip:79.170/16': 0.16; 'url-ip:79/8': 0.16; 'url:alan-g': 0.16;
'url:alan_gauld': 0.16; 'url:alangauldphotos': 0.16; 'wikipedia':
0.16; 'wrote:': 0.16; 'python': 0.16; 'reached': 0.17; 'grant':
0.17; 'url:amazon': 0.19; 'to:addr:python-list': 0.20; 'to:name
:python-list@python.org': 0.24; 'anything': 0.25; 'tried': 0.26;
'fact': 0.28; 'header:User-Agent:1': 0.30; 'program': 0.31;
'python-list': 0.32; 'received:192.168.1': 0.32; '100': 0.33;
"didn't": 0.34; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'from:addr:gmail.com': 0.35;
'author': 0.37; 'received:192.168': 0.37; 'thanks': 0.38; 'alan':
0.40; 'learn': 0.40; 'python.org': 0.62; 'follow': 0.62; 'listed':
0.67; 'url-ip:3/8': 0.67; 'url:author': 0.69; 'site': 0.70;
'sites': 0.70; 'manage': 0.73; 'bing,': 0.84; 'entry,': 0.84;
'subject: \n ': 0.84; 'google,': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1709722780; x=1710327580; darn=python.org;
h=content-transfer-encoding:in-reply-to:references:to
:content-language:subject:user-agent:mime-version:date:message-id
:from:from:to:cc:subject:date:message-id:reply-to;
bh=bA52SjDuQOL5Cv4aQXgZGx67x57qsc4KPu7r7vws/y4=;
b=loAZVkuxyZ9xRLow1nhAE4d2RBplyPHX2tQT09lftCRXEQCVj+7Q+D6UJ7bT6in9w2
pJIk6vrabpz72UapPO9QQOmHs5jfzgwRzUoZTn7DDJAHaUN4005Ln62y758irkmO4Bpa
LDuCUlGqsdbS9WAQM66fUNL4hys7H08VDirVepfS6UUn8AUClcSASIrrML7lnw+jvho0
p7hfa+ze+nWSaRMzuw3Inqd9RL/ZLa6WZA3B928jqbK5wbLQ2yPcHVO+RPulObKgR71o
RflVcfhlNYHJRKACfHjnOv7i9URgGqemotrSlJFaP+XvJ+3CSahYFSydYRgoakhZr2GV
cq0A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1709722780; x=1710327580;
h=content-transfer-encoding:in-reply-to:references:to
:content-language:subject:user-agent:mime-version:date:message-id
:from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=bA52SjDuQOL5Cv4aQXgZGx67x57qsc4KPu7r7vws/y4=;
b=ElBadfRTRd1xIA6Pyz0qJmoebJXEerLGmXmiGOxuH6PXtNPgAGeray5sI14tryuFX2
O2QRKSocHlphXlBkY/juiHUUIpdhxE7tFIlxay5QMZIFOR1ufl62pyljT4S31mYZSLsX
+NU61QFwXS4ZllK6sMFSC+iu1CfJEJQF0iEgGJpa3Ch/8GaMnVgyzcuBeRSvMJgw/Kvu
z36W3w3xj7kGdZPgv/wILkiIadXK4Trx6/wpys/azcX/NjB4n7ZfySiDJaahaxFp/o6s
c0b32OT1UCnrgax+UhpJjV8QboJTrRJom3OAG9LoxIDFMl5jmYbg4cWDdOD7yjqLxzMx
44dA==
X-Gm-Message-State: AOJu0Yz3CeAQdrz/pVrB/2DiHfrJXH7mbWicfKg2YZSYy0LItaCc+puo
f44q+9lm9zUVBWvyaoP8dDrFvo+lFkqd6fPjg3Qt9MPHqMg/miIjFvFTSU5WhBk=
X-Google-Smtp-Source: AGHT+IFkTHOftrV23ldCSH5wQ0k2stV7/ZsoGGX76QBLPKrj6Ajxcns3plrnP+7k3F8599NUuhijzw==
X-Received: by 2002:a17:906:8c6:b0:a3e:9aa3:7024 with SMTP id
o6-20020a17090608c600b00a3e9aa37024mr10091915eje.34.1709722780106;
Wed, 06 Mar 2024 02:59:40 -0800 (PST)
X-Google-Original-From: Alan Gauld <alan.gauld@yahoo.co.uk>
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <4Tq9fJ0qN7znVFY@mail.python.org>
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: <d12bdeb5-8049-44b3-858e-e874cabbbc4e@yahoo.co.uk>
X-Mailman-Original-References: <aff560df-2f57-47d9-ad81-74c21960c21d@gmail.com>
<ZeeMgL/4hFh/XDJz@cskk.homeip.net> <4Tq9fJ0qN7znVFY@mail.python.org>
 by: Alan Gauld - Wed, 6 Mar 2024 10:59 UTC

On 05/03/2024 22:46, Grant Edwards via Python-list wrote:
> Unfortunately (presumably thanks to SEO) the enshittification of
> Google has reached the point where searching for info on things like
> Python name scope, the first page of links are to worthless sites like
> geeksforgeeks.
And not just Google, I just tried bing, yahoo and duckduckgo
and they are all the same. Not a one listed anything from
python.org on the first page... In fact it didn't even appear
in the first 100 listings, although wikipedia did manage an
entry, eventually.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor