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; 'python,': 0.01; 'subject:Python': 0.04; '(instead': 0.07; 'terry': 0.07; 'python': 0.07; 'namespace': 0.09; 'object.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'am,': 0.14; 'broken': 0.14; 'wrote:': 0.14; '*any*': 0.16; 'bindings,': 0.16; 'boundaries': 0.16; 'immutable': 0.16; 'locations.': 0.16; 'manipulating': 0.16; 'model.': 0.16; 'namespace,': 0.16; 'pointers,': 0.16; 'reedy': 0.16; 'slots.': 0.16; 'otherwise,': 0.20; 'code,': 0.20; 'jan': 0.22; 'header:In-Reply-To:1': 0.22; 'itself.': 0.22; 'right.': 0.22; 'gregory': 0.23; 'objects': 0.24; 'equivalent': 0.26; 'subject:data': 0.26; 'object': 0.27; "doesn't": 0.28; 'subject:?': 0.29; 'direction': 0.29; 'ewing': 0.31; 'objects.': 0.31; 'separate': 0.31; 'to:addr:python-list': 0.32; "i've": 0.33; 'lines': 0.34; 'header:X-Complaints-To:1': 0.34; 'there': 0.35; 'correctly': 0.35; 'form.': 0.35; 'that,': 0.35; 'difficult': 0.35; 'header:User-Agent:1': 0.35; 'subject:What': 0.35; 'subject:use': 0.35; 'think': 0.36; 'data': 0.37; 'some': 0.37; 'should': 0.37; 'useful': 0.37; 'else,': 0.38; 'execute': 0.38; 'pretty': 0.38; 'third': 0.38; 'used': 0.38; 'received:org': 0.38; 'under': 0.39; 'set': 0.39; 'explain': 0.39; 'to:addr:python.org': 0.39; 'could': 0.39; 'header:Mime-Version:1': 0.39; 'how': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'order': 0.61; 'link': 0.62; 'presented': 0.63; 'here': 0.65; 'due': 0.67; 'collection': 0.71; 'imagine': 0.72; 'concept': 0.73; 'subject:other': 0.84; 'animated': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: What other languages use the same data model as Python? Date: Tue, 10 May 2011 15:18:52 -0400 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> <7q1898-f3l.ln1@svn.schaathun.net> <9fd898-0el.ln1@svn.schaathun.net> <92f70aF9pqU1@mid.individual.net> <92kh9cFgdcU1@mid.individual.net> <4dc5fd42$0$29991$c3e8da3$5496439d@news.astraweb.com> <92os6dF5jbU1@mid.individual.net> <4dc7fa2f$0$29991$c3e8da3$5496439d@news.astraweb.com> <92s8hlFqn5U1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 In-Reply-To: <92s8hlFqn5U1@mid.individual.net> 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: 34 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305055148 news.xs4all.nl 81473 [::ffff:82.94.164.166]:45149 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5083 On 5/10/2011 3:41 AM, Gregory Ewing wrote: > Actually, you're right. What I've presented is a paper-and-pencil > implementation of the Python data model. Together with a set of > rules for manipulating the diagram under the direction of Python > code, you have a complete implementation of Python that you can > execute in your head. I think that it would be both fun and useful to have an animated graphical tutorial that used and box and arrow model. Names should be in ovals (instead of the little boxes used here due to text limitations) to differentiate them from objects. Immutable objects could have solid boundaries and mutables a broken line boundary. Collection objects would have dotted lines to separate slots. Ovals could also use different lines for builtins, globals, and locals. > And you NEED such an implementation in order to reason correctly > about Python programs under all circumstances. > > I find it very difficult to imagine *any* implementation of > Python, computer-based or otherwise, that doesn't have something > equivalent to references. Whether you call them that, or pointers, > or arrows, or object bindings, or something else, the concept > needs to be there in some form. Since namespaces link names in a namespace with objects not in the namespace, any practical implementation needs a third entity to link or associated each name with an object. This is pretty much needed to explain multiple links without objects being in multiple locations. It is also needed to explain how an object can link to itself. -- Terry Jan Reedy