Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #110446
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: the global keyword: |
| Date | Fri, 24 Jun 2016 11:19:52 +1000 |
| Lines | 12 |
| Message-ID | <mailman.88.1466731194.11516.python-list@python.org> (permalink) |
| References | <edb72d55-3a44-45f8-8122-b86d62e837c3@googlegroups.com> <njkbu8$e4c$1@dont-email.me> <646e9ff9-b5a1-4403-b79a-694397e34b0b@googlegroups.com> <1466529321.3842871.644317377.08527069@webmail.messagingengine.com> <mailman.10.1466529325.11516.python-list@python.org> <195658b2-e1b2-4c91-8ff8-bd58379e700f@googlegroups.com> <nkchrb$b20$1@dont-email.me> <cf500e11-7b28-42bc-a62f-670eb1fc48bf@googlegroups.com> <nkdlg4$52e$1@dont-email.me> <576c863a$0$1598$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqLU=5Mu0RBpZ=NbmCXGAPxr-F2Om383HsWA=XFfwNQvQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de q+SwxxZekH4BdEMmeOss9QXfcl809AE/PC1AaCZOpx/g== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'removes': 0.05; 'attributes': 0.07; 'cc:addr:python-list': 0.09; "(i'd": 0.09; 'python': 0.10; '2016': 0.16; '24,': 0.16; 'closure,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'scope.': 0.16; 'wider': 0.16; 'wrote:': 0.16; 'variable': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'c++,': 0.22; 'function,': 0.22; 'visible': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'module.': 0.27; 'objects': 0.29; 'that.': 0.30; 'another': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'received:google.com': 0.35; 'i.e.': 0.35; 'level': 0.35; 'received:74.125.82': 0.35; 'but': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'subject:the': 0.39; 'your': 0.60; 'more': 0.63; 'accessed': 0.66; "they're": 0.66; 'chrisa': 0.84; 'subject::': 0.85; 'to:none': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=tSFZ32Umgp7660F82AswtvlTrByx6Y1xzxwgQihvYO4=; b=JP2xNWCsp1DU/YPeqrkz+c5IvQuRndSwtgrUHmEaCV2l3dTvpLA7fEyiWG9mtcovaK SdtAYjnclg7YgIW9pPIoRnfACyyNIxyd10lO4gxd6DONfhyMI6X/MV5+MevzB/azYORj x4wuyHvZM5g5cEQKbylQCxQc3DV7TFqR/z8PuxcP0lNS90hutYwHwnF8E28g7mnFD9rr fVE9KsJugvZKBXVFEf+ysC7F/fh1Hc+UQyZpvEN2YieBgE7MGzYpVC1Mhh1+j5xqXr+b diPcrvvBSMN4m8BI/DR3S1Q2IGW666GPaII73WtwMUi3IwZFZn5QH1SolzoD7dk4URP8 1oUg== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=tSFZ32Umgp7660F82AswtvlTrByx6Y1xzxwgQihvYO4=; b=e/HwcIClGxZ5W7s6cYGB1Dz8LBMWMHln5jZV3ROgG7qpFfg3qaQV3308e8CmykmDmz DSeUmTNT8UcSYx/4RJaDxoeUsDBMuxqVGs5Zybm4Fp3ibF3VqQv7BxVthSh00QLMVdAU yZpSV01cDHZa8l17ce10ySOFS+tjmiHapFk97obDOwvdI59vPBtMUiv22Lckq0XXsouc xKLKNmEbJyiDi3yRiI/XZfbHuVppaf/b7BCpwCUbAPwpW0Wyjf2jFYs068orAunODtua a1ss3OMApDz9zoExj3Zb5mYgFu+EX/eR5UtehbP92Vc4aLKweucp+BrgqCAHqDFRcxvo iO5Q== |
| X-Gm-Message-State | ALyK8tK+jKDQ2p3f00wMb4yhFlUE3eEHuY4S3Rfee8CsjH5WuD0ag2Bx4mFSR3LtnbFe3GtHBtYw0ddocSHI3w== |
| X-Received | by 10.194.97.201 with SMTP id ec9mr1019308wjb.117.1466731193184; Thu, 23 Jun 2016 18:19:53 -0700 (PDT) |
| In-Reply-To | <576c863a$0$1598$c3e8da3$5496439d@news.astraweb.com> |
| 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 | <CAPTjJmqLU=5Mu0RBpZ=NbmCXGAPxr-F2Om383HsWA=XFfwNQvQ@mail.gmail.com> |
| X-Mailman-Original-References | <edb72d55-3a44-45f8-8122-b86d62e837c3@googlegroups.com> <njkbu8$e4c$1@dont-email.me> <646e9ff9-b5a1-4403-b79a-694397e34b0b@googlegroups.com> <1466529321.3842871.644317377.08527069@webmail.messagingengine.com> <mailman.10.1466529325.11516.python-list@python.org> <195658b2-e1b2-4c91-8ff8-bd58379e700f@googlegroups.com> <nkchrb$b20$1@dont-email.me> <cf500e11-7b28-42bc-a62f-670eb1fc48bf@googlegroups.com> <nkdlg4$52e$1@dont-email.me> <576c863a$0$1598$c3e8da3$5496439d@news.astraweb.com> |
| Xref | csiph.com comp.lang.python:110446 |
Show key headers only | View raw
On Fri, Jun 24, 2016 at 11:00 AM, Steven D'Aprano <steve@pearwood.info> wrote: > To me, a global variable is a variable which is scoped to a level wider than > any single function, i.e. module scope, or whole-application scope. That > is, the variable must be visible to more than one function, or more than > one module. ... and not part of a closure, because they're not global. (I'd also say "nor part of an object", but objects in Python have attributes accessed using 'self.', so your other check removes that. But in C++, that would need to be another criterion.) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-11 16:44 -0700
Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-11 19:50 -0400
Re: the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-11 17:12 -0700
Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-11 21:27 -0400
Re: the global keyword: Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-11 20:15 -0700
Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-12 14:46 -0400
Re: the global keyword: MRAB <python@mrabarnett.plus.com> - 2016-06-12 01:09 +0100
Re: the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-11 17:13 -0700
Re: the global keyword: Ned Batchelder <ned@nedbatchelder.com> - 2016-06-11 20:41 -0700
Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-11 21:26 -0400
Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-12 13:38 +1000
Re: the global keyword: Ned Batchelder <ned@nedbatchelder.com> - 2016-06-11 20:48 -0700
Re: the global keyword: Marcin Rak <mrak@sightlineinnovation.com> - 2016-06-12 11:31 -0700
Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-12 20:07 +0100
Re: the global keyword: Ned Batchelder <ned@nedbatchelder.com> - 2016-06-12 12:25 -0700
Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-12 22:10 +0100
Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-19 16:35 +0200
Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-19 22:20 +0100
Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-20 13:14 +0200
Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-20 22:15 +1000
Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-20 15:04 +0200
Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-20 09:29 -0400
Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-21 00:53 +1000
Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-21 10:08 +0200
Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-21 11:41 +0100
Re: the global keyword: Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-06-21 13:01 +0200
Re: the global keyword: Joel Goldstick <joel.goldstick@gmail.com> - 2016-06-19 13:16 -0400
Re: the global keyword: Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-19 22:50 -0700
Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-20 11:21 +0100
Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-20 22:03 +1000
Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 10:04 -0700
Re: the global keyword: Random832 <random832@fastmail.com> - 2016-06-21 13:15 -0400
Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 15:20 -0700
Re: the global keyword: Chris Angelico <rosuav@gmail.com> - 2016-06-22 08:32 +1000
Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 16:43 -0700
Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-22 00:15 +0100
Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 17:24 -0700
Re: the global keyword: BartC <bc@freeuk.com> - 2016-06-22 10:24 +0100
Re: the global keyword: Steven D'Aprano <steve@pearwood.info> - 2016-06-24 11:00 +1000
Re: the global keyword: Chris Angelico <rosuav@gmail.com> - 2016-06-24 11:19 +1000
Re: the global keyword: eryk sun <eryksun@gmail.com> - 2016-06-24 02:19 +0000
Re: the global keyword: Rick Johnson <rantingrickjohnson@gmail.com> - 2016-06-21 16:50 -0700
csiph-web