Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.06; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'variables.': 0.09; 'python': 0.11; 'agree.': 0.16; 'change;': 0.16; 'finney': 0.16; 'immutable,': 0.16; 'item)': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'variable.': 0.16; 'variables:': 0.16; "python's": 0.19; 'value.': 0.19; 'meant': 0.20; 'header:User-Agent:1': 0.23; 'values': 0.27; 'header:X -Complaints-To:1': 0.27; 'generally': 0.29; 'points': 0.29; 'program,': 0.31; 'writes:': 0.31; 'blog:': 0.33; 'subject:?': 0.36; 'list': 0.37; 'ben': 0.38; 'to:addr:python-list': 0.38; 'anything': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'referred': 0.60; 'course': 0.61; 'name': 0.63; 'refer': 0.63; 'skip:\xe2 10': 0.65; 'experience.': 0.67; '8bit%:43': 0.74; 'ethan': 0.84; 'furman': 0.84; 'partially': 0.84; '\xe2\x80\x9cgood': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Python variables? Date: Tue, 01 Oct 2013 08:37:01 +1000 References: <6e338858-b9e6-4745-9959-35d7c0c7724e@googlegroups.com> <02724244-c924-4cf0-9656-71ade6e435c2@googlegroups.com> <5249ECFE.2050402@nedbatchelder.com> <5249F4EE.60604@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: rasputin.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-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:A0yMzlpUELPTr5Px2y6bYZ4W6NE= 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380580637 news.xs4all.nl 15954 [2001:888:2000:d::a6]:58517 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:55135 Ethan Furman writes: > From [Ned Batchelder]'s blog: > > Names are Python's variables: they refer to values, and > > those values can change (vary) over the course of your > > program. > > This is partially incorrect. If the value referred to by the name is > immutable, then it cannot change; perhaps you meant to say that which > object the name points to can vary over time? I agree. Names are not Python's variables. If anything in Python is a “variable” as generally understood, it is not a name. It is a *binding*, from a reference (a name, or some other reference like a list item) to a value. It is the binding which can change over the course of the program, so that is the variable. -- \ “Good judgement comes from experience. Experience comes from | `\ bad judgement.” —Frederick P. Brooks | _o__) | Ben Finney