Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.057 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'variables': 0.07; 'variables.': 0.09; 'cc:addr:python-list': 0.11; 'language,': 0.12; '"procedure': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'scope,': 0.16; 'scope.': 0.16; 'language': 0.16; 'wrote:': 0.18; "python's": 0.19; 'seems': 0.21; 'issue.': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'python"': 0.31; 'universal': 0.31; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'two': 0.37; 'issue': 0.38; 'though,': 0.39; 'how': 0.40; 'more': 0.64; 'different': 0.65; 'registers': 0.68; 'respect': 0.70; 'apart': 0.72; '"can': 0.84; 'ethan': 0.84; 'furman': 0.84; 'notion': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=n31/IQ06iBtfavKkPW7zcpCsXiUV/d9a1yXxh4IdF+E=; b=EGlLgCj0lH5T8zclKpTAHCMFDIib3QKP4J6InJBB+lkMUc6rs8zJ6lklV+XPKa2aaF QDxTcuuQ5uFsVdHzEamHCYZsdIQ0InpoEIpOE/CdrpK45NOYg4YM9MrhrsPWBIFIEN6u +DV2BveGCgR1EzZDLYK+VfFUNUZ2XsSMWSypZkNMZy+tT0uOKioVUH+T2qINhEjVd6Aw FPhGN3v3HpTHMlptD5V/Zq85u7nGTVDNXPApHAxJ8auG+OHlK8LTGM9+pTcJKonTYG+P 4cIebwZ2KSd2f02Cb/oXKks3RECEuB/LbqpBqRTYlNlsn6wY6s752YsWrixzDf+JmJDG ps/g== MIME-Version: 1.0 X-Received: by 10.221.26.10 with SMTP id rk10mr15882728vcb.0.1399773561789; Sat, 10 May 2014 18:59:21 -0700 (PDT) In-Reply-To: <536ED24B.7040300@stoneleaf.us> References: <235C4BFA-9770-481A-9FCF-21C3F036769C@gmail.com> <5368681D.8070602@islandtraining.com> <87ppjpwafk.fsf@elektro.pacujo.net> <536ad8f2$0$29965$c3e8da3$5496439d@news.astraweb.com> <87zjiqbmy5.fsf@elektro.pacujo.net> <536d7a7d$0$29980$c3e8da3$5496439d@news.astraweb.com> <9cc0ebf9-dbed-4d3d-91fc-2abb9b0103d0@googlegroups.com> <536dc3f7$0$29980$c3e8da3$5496439d@news.astraweb.com> <536decca$0$29980$c3e8da3$5496439d@news.astraweb.com> <536E799D.6080602@stoneleaf.us> <536ED24B.7040300@stoneleaf.us> Date: Sun, 11 May 2014 11:59:21 +1000 Subject: Re: Values and objects From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1399773915 news.xs4all.nl 2942 [2001:888:2000:d::a6]:42030 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71281 On Sun, May 11, 2014 at 11:28 AM, Ethan Furman wrote: > 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. Variables exist in scope. Apart from assembly language, where registers have universal scope, every language I know of has some concept of scope. (REXX is very different from most, in that "PROCEDURE EXPOSE" isn't at all your classic notion of scoping, but there's still the concept that there can be two variables with the same name.) When you create one, you create it in a particular scope, and that's how it must be. ChrisA