Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.04; 'operator': 0.05; 'identical': 0.07; 'pretend': 0.07; 'python?': 0.07; '*you*': 0.09; 'file-like': 0.09; 'integers': 0.09; 'object.': 0.09; 'subclass': 0.09; 'sun,': 0.09; 'tuple': 0.09; 'pm,': 0.11; 'output': 0.12; 'wrote:': 0.14; '"d",': 0.16; '(is': 0.16; 'bieber': 0.16; 'declaimed': 0.16; 'definition,': 0.16; 'is).': 0.16; 'name"': 0.16; 'pipes': 0.16; 'qualified.': 0.16; 'tempted': 0.16; 'header:In-Reply-To:1': 0.22; 'lee': 0.22; 'gregory': 0.23; 'integer': 0.23; 'objects,': 0.23; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'objects': 0.24; 'point,': 0.25; 'subject:data': 0.26; 'chris': 0.27; 'object': 0.27; 'message- id:@mail.gmail.com': 0.28; 'subject:?': 0.29; 'affected': 0.29; 'up.': 0.30; 'points': 0.31; 'equally': 0.31; 'ewing': 0.31; 'i/o': 0.31; 'objects.': 0.31; "can't": 0.31; 'to:addr:python- list': 0.32; 'another': 0.32; 'screen': 0.32; 'uses': 0.34; 'actually': 0.34; 'apply': 0.34; 'file.': 0.34; 'there': 0.35; 'file': 0.35; 'that,': 0.35; 'subject:What': 0.35; 'subject:use': 0.35; 'too': 0.36; 'two': 0.37; 'some': 0.37; 'received:209.85': 0.37; 'execute': 0.38; 'received:google.com': 0.38; 'less': 0.38; 'but': 0.38; 'happens': 0.38; 'members': 0.38; 'not,': 0.39; 'to.': 0.39; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'could': 0.39; 'received:209': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'might': 0.40; '2011': 0.62; 'upon': 0.63; 'special': 0.66; 'dennis': 0.68; 'partially': 0.84; 'subject:other': 0.84; 'sum': 0.89 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=wqr/cY9gw+GazfI1dUDairhx37beLWz9E1+ySDrXPRg=; b=RfCIkiDqAPd/GY9WxHz5cntRReYZoqS2I2kVongdvhiomhAkAVZpWqlr8cDzP2RUkx j2wQiTmysf6pwir40Sb0h8AqIM0toyrlK36sVTUvKZ4I4OvM9SuNbLegUVAb1nLksnKW 1nLAhpAu7RnRJl+9rNcGLKIMzovDdQO1bKhJU= 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=BUtXq04/qLCdXf1AQxpOAyB28QZ3Go7ccqveoQYqRdpDC4v1LIIyRoRaU4IJXyK09N jMNjjUC32AFl0VIRGV5/GR3JbjqXp/k+4aBlvjCjodrcxYAsISskTxA24/DXxKWcpbpS /dwMi6UoeEyXS74ENx6u96sjmbuSik6LqpwQE= MIME-Version: 1.0 In-Reply-To: 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 16:32:04 +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=ISO-8859-1 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: 40 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304836333 news.xs4all.nl 32470 [::ffff:82.94.164.166]:59044 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4946 On Sun, May 8, 2011 at 4:16 PM, Dennis Lee Bieber w= rote: > On Sun, 08 May 2011 10:54:57 +1200, Gregory Ewing > declaimed the following in > gmane.comp.python.general: > >> >> What would *you* call a[i]? >> > =A0 =A0 =A0 =A0Depending upon the nature of the beast, I'd be tempted to = call it a > "fully qualified name" or a "partially qualified name" > > =A0 =A0 =A0 =A0a =3D [1, 2, 4, ("c", "d", "e")] Why is an integer more or less important than a tuple? a[3] is no less qualified than a[2]; each of them points to an object. One of those objects happens to contain other objects. What if you had: stdio =3D [stdin, stdout, stderr] They might be 'file' objects, or they might be integers (unlikely in Python), or they could be pipes or other file-like objects, or they might be some kind of special tee object that contains two file objects. Let's say your standard I/O uses the notation stdout.write('message') and that you have a subclass of tuple that will apply the . operator to all its members (is that possible in Python? If not, pretend it is). You could then execute stdio[1]=3D(stdout,teeobject) to easily copy your screen output to another file. At this point, you can actually pretend that stdio[0] and stdio[1] are identical objects, but you can use stdio[1][1] and you can't use stdio[0][1] - which means that, per your definition, one of them is only partially qualified. As Inigo Montoya said, there is too much - let me sum up. Lists/tuples and integers are equally objects, so whether or not you have a 'name' is not affected by what type of object it points to. Chris Angelico