Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'variables': 0.07; '[1,': 0.09; 'beginners': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'finney': 0.16; 'language?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'programming': 0.22; 'header:User-Agent:1': 0.23; 'received:comcast.net': 0.24; 'recognize': 0.24; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'assert': 0.31; 'writes:': 0.31; 'this.': 0.32; 'know.': 0.32; 'languages': 0.32; 'worked': 0.33; 'but': 0.35; 'ben': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'subject:The': 0.64; 'subjectcharset:utf-8': 0.72; 'subject:have': 0.80; '"spam"': 0.84; 'fails,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: The =?UTF-8?B?4oCcZG9lcyBQeXRob24gaGF2ZSB2YXJpYWJsZXM/4oCdIGQ=?= =?UTF-8?B?ZWJhdGU=?= Date: Wed, 07 May 2014 21:33:01 -0400 References: <235C4BFA-9770-481A-9FCF-21C3F036769C@gmail.com> <5368681D.8070602@islandtraining.com> <85zjiuea37.fsf_-_@benfinney.id.au> <8738gmxgay.fsf@elektro.pacujo.net> <87tx91warf.fsf@elektro.pacujo.net> <85eh05cdjx.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: c-50-133-228-126.hsd1.ma.comcast.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <85eh05cdjx.fsf@benfinney.id.au> 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1399512795 news.xs4all.nl 2860 [2001:888:2000:d::a6]:36790 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71067 On 5/7/14 8:35 PM, Ben Finney wrote: > Marko Rauhamaa writes: > >> Ben Finney : >> >>> That's why I always try to say “Python doesn't have variables the way >>> you might know from many other languages”, >> >> Please elaborate. To me, Python variables are like variables in all >> programming languages I know. > > Many established and still-popular languages have the following > behaviour:: > > # pseudocode > > foo = [1, 2, 3] > bar = foo # bar gets the value [1, 2, 3] > assert foo == bar # succeeds > foo[1] = "spam" # foo is now == [1, "spam", 3] > assert foo == bar # FAILS, ‘bar’ == [1, 2, 3] > Can we make this concrete by speaking about a specific language? I don't recognize this. I thought we were concerned with beginners incorrectly thinking Python worked like C, but this is nothing like C. -- Ned Batchelder, http://nedbatchelder.com