Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!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; 'differently': 0.07; 'javascript,': 0.07; 'method.': 0.07; 'variables': 0.07; 'php,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'ruby,': 0.09; 'variables.': 0.09; 'python': 0.11; '*values*': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:variable': 0.16; 'variables,': 0.16; 'java,': 0.16; 'wrote:': 0.18; 'passing': 0.19; 'header:User-Agent:1': 0.23; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'gary': 0.31; 'values.': 0.31; 'bugs': 0.33; 'but': 0.35; 'there': 0.35; 'keyword': 0.36; 'much.': 0.36; 'var': 0.36; 'to:addr:python-list': 0.38; 'fact': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'most': 0.60; 'such': 0.63; 'different': 0.65; 'fact,': 0.69 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: Pass variable by reference Date: Tue, 06 May 2014 16:31:35 -0400 References: <235C4BFA-9770-481A-9FCF-21C3F036769C@gmail.com> <5368681D.8070602@islandtraining.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 18.189.31.53 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <5368681D.8070602@islandtraining.com> 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1399408799 news.xs4all.nl 2925 [2001:888:2000:d::a6]:50708 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70985 On 5/6/14 12:42 AM, Gary Herron wrote: > This gets confusing, but in fact the most accurate answer is that Python > does not have "variables", so there is no such thing as passing > "variables" by reference or any other method. Python *does* have names > bound to values, but that's a very different thing. If necessary, you > may consider that the *values* are passed by reference. This meme bugs me so much. Python has variables. They work differently than variables in C. In fact, they work by having names bound to values. If you want to insist that Python has no variables, you will have to also say that neither do Javascript, Ruby, Java, PHP, etc. And if Javascript has no variables, what does the var keyword mean? -- Ned Batchelder, http://nedbatchelder.com