Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71280
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'yet.': 0.04; 'argument': 0.05; '*not*': 0.07; 'though:': 0.07; 'variables': 0.07; '*is*': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'variables.': 0.09; '~ethan~': 0.09; 'cease': 0.16; 'created.': 0.16; 'variables,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'module': 0.19; "python's": 0.19; 'seems': 0.21; 'issue.': 0.22; 'header:User-Agent:1': 0.23; "aren't": 0.24; 'exists': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'correct': 0.29; 'chris': 0.29; 'am,': 0.29; "i'm": 0.30; '(although': 0.31; 'about.': 0.31; 'python"': 0.31; 'charset:us- ascii': 0.36; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'anything': 0.39; 'though,': 0.39; 'delete': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'new': 0.61; 'received:173': 0.61; 'simple': 0.61; 'name': 0.63; 'more': 0.64; 'talking': 0.65; 'sound': 0.68; 'respect': 0.70; '"can': 0.84; 'confirmed,': 0.84; 'ethan': 0.84; 'furman': 0.84; 'shadow': 0.84; 'responses': 0.93 |
| Date | Sat, 10 May 2014 18:28:43 -0700 |
| From | Ethan Furman <ethan@stoneleaf.us> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Values and objects |
| References | <235C4BFA-9770-481A-9FCF-21C3F036769C@gmail.com> <5368681D.8070602@islandtraining.com> <mailman.9710.1399408799.18130.python-list@python.org> <lkbigv$ban$1@speranza.aioe.org> <mailman.9713.1399419985.18130.python-list@python.org> <lkdt0u$moc$1@speranza.aioe.org> <87ppjpwafk.fsf@elektro.pacujo.net> <536ad8f2$0$29965$c3e8da3$5496439d@news.astraweb.com> <lkjitj$d0c$1@speranza.aioe.org> <87zjiqbmy5.fsf@elektro.pacujo.net> <536d7a7d$0$29980$c3e8da3$5496439d@news.astraweb.com> <9cc0ebf9-dbed-4d3d-91fc-2abb9b0103d0@googlegroups.com> <mailman.9841.1399689216.18130.python-list@python.org> <536dc3f7$0$29980$c3e8da3$5496439d@news.astraweb.com> <mailman.9843.1399706518.18130.python-list@python.org> <536decca$0$29980$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqynuf6giRvYP5P7SA_g2DH_MhRp-2=w72kLthsFqx74g@mail.gmail.com> <536E799D.6080602@stoneleaf.us> <CAPTjJmrY9iM9+Tsdkrz_5skLtgEfWFC6D79AObohSe2HCLSagQ@mail.gmail.com> |
| In-Reply-To | <CAPTjJmrY9iM9+Tsdkrz_5skLtgEfWFC6D79AObohSe2HCLSagQ@mail.gmail.com> |
| Content-Type | text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - gator3304.hostgator.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - stoneleaf.us |
| X-BWhitelist | no |
| X-Source-IP | 173.12.184.233 |
| X-Exim-ID | 1WjIZH-0005Zi-EP |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| X-Source-Sender | ([173.12.184.233]) [173.12.184.233]:34145 |
| X-Source-Auth | ethan+stoneleaf.us |
| X-Email-Count | 1 |
| X-Source-Cap | dG9idWs7dG9idWs7Z2F0b3IzMzA0Lmhvc3RnYXRvci5jb20= |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9871.1399773079.18130.python-list@python.org> (permalink) |
| Lines | 32 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1399773079 news.xs4all.nl 2835 [2001:888:2000:d::a6]:38798 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:71280 |
Show key headers only | View raw
On 05/10/2014 04:18 PM, Chris Angelico wrote: > On Sun, May 11, 2014 at 5:10 AM, Ethan Furman <ethan@stoneleaf.us> wrote: >> And if you don't like that argument (although it is a perfectly sound and >> correct argument), think of the module name space: >> >> >> ret = spam >> spam = 23 >> >> will net you a simple NameError, because spam has not yet been created. > > What about this, though: > > ret = int > int = 23 > > That will *not* net you a NameError, because 'int' exists in an outer > scope (builtins). You can create a new module-scope variable and it > will immediately begin to shadow a builtin; you can delete that > variable and it will immediately cease to shadow that builtin. That's > the difference I'm talking about. With function-local variables, they > all have to exist (as other responses confirmed, that *is* a language > guarantee), even though some of them aren't bound to anything yet. Well, with function variables they have to exist *when you use them*. ;) This seems like more of a scoping issue than a "can we create variables in Python" issue. I am curious, though, what other python's do with respect to function variables. -- ~Ethan~
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Pass variable by reference Ned Batchelder <ned@nedbatchelder.com> - 2014-05-06 16:31 -0400
Re: Pass variable by reference Mark H Harris <harrismh777@gmail.com> - 2014-05-06 16:00 -0500
Re: Pass variable by reference Ned Batchelder <ned@nedbatchelder.com> - 2014-05-06 17:27 -0400
Re: Pass variable by reference Chris Angelico <rosuav@gmail.com> - 2014-05-07 09:46 +1000
Re: Pass variable by reference Rustom Mody <rustompmody@gmail.com> - 2014-05-06 19:18 -0700
Re: Pass variable by reference Chris Angelico <rosuav@gmail.com> - 2014-05-07 12:39 +1000
Re: Pass variable by reference Rustom Mody <rustompmody@gmail.com> - 2014-05-06 19:54 -0700
Re: Pass variable by reference Steven D'Aprano <steve@pearwood.info> - 2014-05-07 04:59 +0000
Re: Pass variable by reference Mark H Harris <harrismh777@gmail.com> - 2014-05-07 13:11 -0500
Re: Pass variable by reference Marko Rauhamaa <marko@pacujo.net> - 2014-05-08 00:22 +0300
Values and objects [was Re: Pass variable by reference] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-08 01:08 +0000
Re: Values and objects [was Re: Pass variable by reference] Mark H Harris <harrismh777@gmail.com> - 2014-05-09 16:56 -0500
Re: Values and objects Marko Rauhamaa <marko@pacujo.net> - 2014-05-10 01:34 +0300
Re: Values and objects Ben Finney <ben@benfinney.id.au> - 2014-05-10 10:24 +1000
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-10 01:01 +0000
Re: Values and objects Rustom Mody <rustompmody@gmail.com> - 2014-05-09 19:19 -0700
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-10 12:33 +1000
Re: Values and objects Rustom Mody <rustompmody@gmail.com> - 2014-05-09 20:05 -0700
Re: Values and objects Mark H Harris <harrismh777@gmail.com> - 2014-05-09 23:15 -0500
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-10 06:15 +0000
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-10 17:21 +1000
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-10 09:09 +0000
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-10 19:32 +1000
Re: Values and objects Ethan Furman <ethan@stoneleaf.us> - 2014-05-10 12:10 -0700
Re: Values and objects MRAB <python@mrabarnett.plus.com> - 2014-05-10 20:22 +0100
Re: Values and objects Ethan Furman <ethan@stoneleaf.us> - 2014-05-10 12:28 -0700
Re: Values and objects Terry Reedy <tjreedy@udel.edu> - 2014-05-10 16:16 -0400
Re: Values and objects Terry Reedy <tjreedy@udel.edu> - 2014-05-10 16:24 -0400
Re: Values and objects Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-05-10 14:03 -0700
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-11 03:17 +0000
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-11 13:30 +1000
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-11 05:11 +0000
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-11 15:22 +1000
Re: Values and objects Rustom Mody <rustompmody@gmail.com> - 2014-05-10 22:31 -0700
Re: Values and objects Marko Rauhamaa <marko@pacujo.net> - 2014-05-11 09:21 +0300
Re: Values and objects Rustom Mody <rustompmody@gmail.com> - 2014-05-10 23:48 -0700
Re: Values and objects Marko Rauhamaa <marko@pacujo.net> - 2014-05-11 18:10 +0300
Re: Values and objects Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-05-11 11:26 +0300
Re: Values and objects Rustom Mody <rustompmody@gmail.com> - 2014-05-11 01:48 -0700
Re: Values and objects Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-05-11 15:22 +0300
Re: Values and objects Marko Rauhamaa <marko@pacujo.net> - 2014-05-11 18:46 +0300
Re: Values and objects Marko Rauhamaa <marko@pacujo.net> - 2014-05-11 22:56 +0300
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-11 12:51 +0000
Re: Values and objects Rustom Mody <rustompmody@gmail.com> - 2014-05-11 07:12 -0700
Re: Values and objects Ethan Furman <ethan@stoneleaf.us> - 2014-05-10 22:42 -0700
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-11 06:40 +0000
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-11 09:18 +1000
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-11 03:11 +0000
Re: Values and objects Rotwang <sg552@hotmail.co.uk> - 2014-05-11 14:46 +0100
Re: Values and objects Ned Batchelder <ned@nedbatchelder.com> - 2014-05-11 14:40 -0400
Re: Values and objects Rotwang <sg552@hotmail.co.uk> - 2014-05-12 00:06 +0100
Re: Values and objects Ethan Furman <ethan@stoneleaf.us> - 2014-05-10 18:28 -0700
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-11 07:24 +0000
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-11 11:59 +1000
Re: Values and objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-11 07:29 +0000
Re: Values and objects Ethan Furman <ethan@stoneleaf.us> - 2014-05-10 21:46 -0700
Re: [Python-Dev] Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-11 16:08 +1000
Re: Values and objects albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-05-17 14:26 +0000
Re: Values and objects Chris Angelico <rosuav@gmail.com> - 2014-05-10 11:58 +1000
Re: Values and objects Marko Rauhamaa <marko@pacujo.net> - 2014-05-10 10:57 +0300
Re: Values and objects Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-05-10 11:06 +0300
Re: Values and objects Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-10 12:07 -0400
Re: Pass variable by reference Chris Angelico <rosuav@gmail.com> - 2014-05-08 11:31 +1000
Re: Pass variable by reference Mark H Harris <harrismh777@gmail.com> - 2014-05-09 17:30 -0500
Abstractions [was Re: Pass variable by reference] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-10 00:58 +0000
Re: Abstractions [was Re: Pass variable by reference] Mark H Harris <harrismh777@gmail.com> - 2014-05-09 21:17 -0500
Re: Pass variable by reference Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-07 01:14 +0000
csiph-web