Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109865

Re: the global keyword:

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Random832 <random832@fastmail.com>
Newsgroups comp.lang.python
Subject Re: the global keyword:
Date Sun, 12 Jun 2016 14:47:40 -0400
Lines 12
Message-ID <mailman.22.1465757262.2288.python-list@python.org> (permalink)
References <1465757260.2765216.635400889.237B0FEB@webmail.messagingengine.com>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de 66XVFgwG0VlU2Y5I3PfQzgPfx/q2lZvm00GdsKrUH2YQ==
Return-Path <random832@fastmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'static': 0.03; 'variable,': 0.07; 'assigning': 0.09; 'received:internal': 0.09; 'python': 0.10; 'importing': 0.15; 'languages.': 0.15; '2016': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; "module's": 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'variable.': 0.16; 'wrote:': 0.16; 'variable': 0.18; 'lawrence': 0.22; 'sat,': 0.23; 'unlike': 0.23; 'module': 0.25; "doesn't": 0.26; 'sure,': 0.29; 'statement': 0.32; 'clear': 0.35; 'but': 0.36; 'assigned': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'really': 0.37; '12,': 0.37; 'things': 0.38; 'received:66': 0.38; 'subject:the': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.61; 'continuous': 0.66; 'subject::': 0.85
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Vq5 tD/aKpBus1P1UDXqnWQdMWJ0=; b=ANk+MAZMT9UuA1TPA0txcNCVGavRUR+g8Jm jFMjkPzw8106j0eFQ0gU/CZ3+EZjFLXXUgeA/izuDW/5UdzjgdLe3t+K5ETN+b4w nhqGpnSnopMWZclESi0gMwFRcqMC4XtYssfy2XckA0Pmh9HSdAI/dgXni5CokfPS I3T6oRXA=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=Vq5tD/aKpBus1P1UDXqnWQdMWJ0=; b=nlxwF w8HRNNhzfbRm0pabUHoo3vA1CnImQxQ4nQ/k3gOR3gTn6Rp62REgTLO46XpcKcuX 3X/LPa2xXfHVjHjgzOSNK2W0VPsyLGj+gWta1xlOSVRR9LU+5SF3JrIbl1Xa1OY5 YXNAZ3cZgwVgMQJIewRsxPSx8jOVpjN5thCld4=
X-Sasl-Enc v/bFuRbeTea2VrR1sekNQTkk73mHPIGyZSi+RxaMlEqP 1465757260
X-Mailer MessagingEngine.com Webmail Interface - ajax-aff28cd1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
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 <http://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 <1465757260.2765216.635400889.237B0FEB@webmail.messagingengine.com>
Xref csiph.com comp.lang.python:109865

Show key headers only | View raw


On Sat, Jun 11, 2016, at 23:15, Lawrence D’Oliveiro wrote:
> On Sunday, June 12, 2016 at 11:51:11 AM UTC+12, Random832 wrote:
> > Importing a variable from a module copies its value into your own
> > module's variable.
> 
> Every name in Python is a variable, and can be assigned to to change its
> value at any time.

Sure, but that doesn't really help explain this situation, since your
statement doesn't make clear the fact that by importing foo.a into bar
you are really merely assigning to bar.a rather than having continuous
access to foo.a, unlike how importing things works in static languages.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-12 14:47 -0400

csiph-web