Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'true,': 0.05; 'subject:Python': 0.06; 'variables.': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'agree.': 0.16; 'change;': 0.16; 'finney': 0.16; 'immutable,': 0.16; 'item)': 0.16; 'variable.': 0.16; 'variables:': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'variable': 0.18; "python's": 0.19; 'value.': 0.19; 'later': 0.20; 'meant': 0.20; '>>>': 0.22; 'comfortable': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'refers': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'generally': 0.29; 'points': 0.29; 'program,': 0.31; 'changed.': 0.31; 'writes:': 0.31; 'blog:': 0.33; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'list': 0.37; 'ben': 0.38; 'pm,': 0.38; 'anything': 0.39; 'referred': 0.60; 'course': 0.61; 'name': 0.63; 'refer': 0.63; 'skip:\xe2 10': 0.65; 'talking': 0.65; 'here': 0.66; '8bit%:43': 0.74; 'ethan': 0.84; 'furman': 0.84; 'partially': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=8F23Qo4HqTlnRUkmwrX7QEYK/9/yZpDfBrpIayM6Z98=; b=RivR9eVfC5itWsB/YVdpjO/pxutNdQdhXcj3Idu7EZbNweXLVTd1DzC26xoQTDYbnR y3iVxutmuifhdNatLJoydoIQV6biyMhia+WqGFZi22MY1r6sNik8ZCd0Zke3aFHLUSUI x+ra+jFle7loQJGim2NEL7otDpnJR8wjg4+AXBSXE4Wt1pRlmYWKo9zOt4MwXoSM0sjd KAwt8rhGieJMu1BZ8Mg+oYlMZ21OV1pk1CDzUKTV1zgKA+lR7e9QYFCBPsTpOCoFs6yw 1y0xMEaSj5+AnEwUTE84skkT94i08272GWCQ1/hwhyFYeqqMNTGSpv62UMbkr5h73hqq WNkA== X-Received: by 10.49.71.169 with SMTP id w9mr5404877qeu.95.1380584872005; Mon, 30 Sep 2013 16:47:52 -0700 (PDT) Sender: Ned Batchelder Date: Mon, 30 Sep 2013 19:47:49 -0400 From: Ned Batchelder User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Ben Finney Subject: Re: Python variables? References: <6e338858-b9e6-4745-9959-35d7c0c7724e@googlegroups.com> <02724244-c924-4cf0-9656-71ade6e435c2@googlegroups.com> <5249ECFE.2050402@nedbatchelder.com> <5249F4EE.60604@stoneleaf.us> <7wr4c6rl6a.fsf@benfinney.id.au> In-Reply-To: <7wr4c6rl6a.fsf@benfinney.id.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: python-list@python.org 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380584880 news.xs4all.nl 15952 [2001:888:2000:d::a6]:60959 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:55143 On 9/30/13 6:37 PM, Ben Finney wrote: > 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. > True, but no one calls the binding the variable. Here is a program: x = 4 Every one of us is perfectly comfortable talking about the variable x. Don't get hung up on implementation pedantry. The name x here refers to 4. Later it could refer to "four". The value associated with the name x changed. x is a variable. --Ned.