Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.05; 'memory.': 0.05; 'interpreted': 0.07; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'runtime': 0.09; 'terry': 0.09; 'typed': 0.09; '(rather': 0.16; 'blocks': 0.16; 'compiler,': 0.16; 'jerry': 0.16; 'personally,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:Objects': 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'typing': 0.17; 'variables': 0.17; 'jan': 0.18; 'input': 0.18; 'code.': 0.20; 'variable': 0.20; 'idea': 0.24; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'values': 0.26; 'am,': 0.27; 'first,': 0.27; 'header:X-Complaints-To:1': 0.28; 'points': 0.29; 'function': 0.30; 'code': 0.31; '(and': 0.32; 'to:addr:python-list': 0.33; 'text': 0.34; 'done': 0.34; 'clear': 0.35; 'locations': 0.35; 'especially': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'two': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'address': 0.60; '10:43': 0.84; 'received:fios.verizon.net': 0.84; 'hill': 0.96 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Objects in Python Date: Thu, 23 Aug 2012 13:17:38 -0400 References: <18409992-1e28-4721-8e64-60c69668da4e@googlegroups.com> <87d32i1ntc.fsf@benfinney.id.au> <5035d3e4$0$1645$c3e8da3$76491128@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345742290 news.xs4all.nl 6877 [2001:888:2000:d::a6]:42182 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27749 On 8/23/2012 10:43 AM, Jerry Hill wrote: > Personally, when I was learning python I found the idea of python > having names and values (rather than variables and references) to > clear up a lot of my misconceptions of the python object model. I > think it's done the same for other people too, especially those who > come from the C world, where a variable is a named and typed location > in memory. There are two important points about C and assembler. First, the named locations (and un-named internal locations like function return addresses) are *contiguous*. Giving a user access to one block may give a user access to other blocks if one is not careful. The other is that the typing is in the code and compiler, but not in the runtime memory. So text input can be read as code and a return jump address to the bytes interpreted as code. -- Terry Jan Reedy