Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.04; 'value,': 0.04; 'stuff.': 0.05; 'disagree': 0.07; 'names.': 0.07; '*you*': 0.09; 'sun,': 0.09; 'am,': 0.14; 'wrote:': 0.14; '*do*': 0.16; 'expression.': 0.16; 'finney': 0.16; 'wrap': 0.19; 'variable': 0.21; 'not.': 0.22; 'header:In-Reply-To:1': 0.22; 'expectation': 0.23; 'gregory': 0.23; 'indices': 0.23; 'name?': 0.23; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'subject:data': 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'subject:?': 0.29; 'nobody': 0.29; 'variables': 0.29; 'ewing': 0.31; 'to:addr:python-list': 0.32; 'expression': 0.33; 'array': 0.33; 'clearly': 0.34; 'point': 0.35; 'subject:What': 0.35; 'subject:use': 0.35; 'usually': 0.36; 'think': 0.36; 'two': 0.37; 'received:209.85': 0.37; 'exactly': 0.37; 'resulting': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'unless': 0.38; 'strong': 0.39; 'received:209.85.214': 0.39; 'set': 0.39; 'to:addr:python.org': 0.39; 'comes': 0.39; 'received:209': 0.39; 'would': 0.40; "it's": 0.40; 'header:Received:5': 0.40; 'might': 0.40; 'charset:windows-1252': 0.61; '2011': 0.62; 'evaluate': 0.72; 'fry': 0.84; 'subject:other': 0.84; 'world!"': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=aByA7QNHg1mkJtiADIl/SXgvuQPl1i/rEyMItw+m/sE=; b=GTsByHYf0coKl22G+11E/69xYR/K4yURK6Ql3bt8n6qsSXerpZyDA8aRaxJJBHXoz5 ++Z1cE+URL1wgk7WPpZo48rsmV1/UUdxCErdPF3WPt2pkLQcGQREid1lH1M3cFKomg7i xX3JhBFIlYmh1avhTFW6tf2RA/FaPgPo2u+IQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=j2hEDvUOmiTA/l/2bdbKJkB75y5r3EMapB2b2Nv/Xjazxqi1OtDXnDz6eiBj2r+C8j vZe3RBEHUX+07rhsJZ2mzjyK9nNWClvU1PgnyM+QUNJ0SZzTE1uV25i7t85lM9SxmBgH 6uqWhu4UytpKlx5net185fJ2PMQetAMTuVCrM= MIME-Version: 1.0 In-Reply-To: <92m0u4Fkl5U1@mid.individual.net> References: <4dbd1dbf$0$29991$c3e8da3$5496439d@news.astraweb.com> <77f64071-b288-404c-8280-b2c61ba77f06@n10g2000yqf.googlegroups.com> <4dc12fb4$0$29991$c3e8da3$5496439d@news.astraweb.com> <87mxj2f8f4.fsf@benfinney.id.au> <4dc2c582$0$29991$c3e8da3$5496439d@news.astraweb.com> <92kjooF31mU1@mid.individual.net> <87aaeymfww.fsf@benfinney.id.au> <92m0u4Fkl5U1@mid.individual.net> Date: Sun, 8 May 2011 09:43:28 +1000 Subject: Re: What other languages use the same data model as Python? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 38 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304811812 news.xs4all.nl 81479 [::ffff:82.94.164.166]:54741 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4928 On Sun, May 8, 2011 at 8:54 AM, Gregory Ewing wrote: > Ben Finney wrote: > >> No, I think not. The term =93variable=94 usually comes with a strong >> expectation that every variable has exactly one name. > > I would say that many variables don't have names *at all*, > unless you consider an expression such as a[i] to be > a "name". And if you *do* consider that to be a name, > then clearly one variable can have a great many names. > > What would *you* call a[i]? a is a variable; i is a variable; a[i] is an expression. It's not a single name, and if you had two variables i and j with the same value, nobody would disagree that a[i] and a[j] ought to be the same thing. That's the whole point of arrays/lists/etc/etc. But if you want to fry your noggin, wrap your head around REXX's compound variables: a=3D5 b=3D3 array.a.b=3D"Hello" /* see, this is a two-dimensional array */ c=3D63/10 array.c=3D"world!" /* see, we can have non-integers as array indices */ d=3Da+1 result =3D array.a.b", "array.d.b /* "Hello, world!" */ So what is a "name" in REXX? You have to evaluate the compound variable as a set of tokens, then evaluate the whole thing again, and is that the name? Because the resulting "name" might not be a valid identifier... Yep, it's good stuff. Chris Angelico