Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'model,': 0.05; 'extent': 0.07; 'variables': 0.07; 'false.': 0.09; 'latter': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'references.': 0.09; 'typed': 0.09; 'python': 0.11; 'finney': 0.16; 'golden': 0.16; 'rather,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'registers.': 0.16; "python's": 0.19; '(the': 0.22; 'header:User-Agent:1': 0.23; "aren't": 0.24; 'header:X-Complaints-To:1': 0.27; 'point': 0.28; 'object.': 0.31; 'writes:': 0.31; 'quite': 0.32; 'objects': 0.35; 'ben': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'expect': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'you.': 0.62; 'refer': 0.63; 'more': 0.64; 'skip:\xe2 10': 0.65; 'between': 0.67; 'percent': 0.68; 'registers': 0.68; '\xe2\x80\x93': 0.77; 'describes': 0.84; 'received:125': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Values and objects Date: Sat, 10 May 2014 10:24:18 +1000 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:4V8yrhSR4LwdX5Paoah2bfeRIIY= 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1399681476 news.xs4all.nl 2925 [2001:888:2000:d::a6]:36715 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71205 Marko Rauhamaa writes: > Right, Python's variables aren't like variables in C. Rather, Python's > variables are like CPU registers. What is the salient difference between those two? I don't see the point of the distinction. Why have you chosen an analogy – CPU registers – that still uses the misleading “copies in containers” model, rather than the “sticky-notes on objects” model? The latter more accurately describes Python's references. > They cannot hold typed or structured objects This is quite false. Every object in Python is typed and structured, and to the extent that Python has “variables”, they always refer to a typed and structured object. -- \ “Do unto others twenty-five percent better than you expect them | `\ to do unto you. (The twenty-five percent is [to correct] for | _o__) error.)” —Linus Pauling's Golden Rule | Ben Finney