Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!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.05; 'from:addr:yahoo.co.uk': 0.05; 'think,': 0.05; 'imply': 0.07; 'variable,': 0.07; 'implies': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'similar,': 0.09; 'python': 0.10; 'dictionary,': 0.16; 'foo.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'thread.': 0.16; 'wrote:': 0.16; 'copied': 0.18; 'pointer': 0.18; 'programmer': 0.18; 'language': 0.19; 'preferred': 0.20; 'assign': 0.22; 'lawrence': 0.22; 'name;': 0.22; 'names.': 0.22; 'object.': 0.22; 'referring': 0.22; "haven't": 0.24; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'header:X -Complaints-To:1': 0.26; 'object,': 0.27; 'correct': 0.28; 'objects': 0.29; 'themselves': 0.29; 'certainly': 0.30; 'regardless': 0.31; 'another': 0.32; 'language.': 0.32; 'add': 0.34; 'list': 0.34; 'gets': 0.35; 'could': 0.35; 'knowledge': 0.35; 'something': 0.35; "isn't": 0.35; 'item': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'say': 0.37; 'received:org': 0.37; 'associated': 0.38; 'skip:v 20': 0.38; 'names': 0.38; 'stuff': 0.38; 'anything': 0.38; 'mean': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; 'still': 0.40; 'your': 0.60; 'charset:windows-1252': 0.62; 'matter': 0.63; 'more': 0.63; 'different': 0.63; 'to,': 0.63; 'our': 0.64; 'places': 0.64; 'benefit': 0.66; 'everybody': 0.67; 'talking': 0.67; 'about,': 0.84; 'fourth': 0.84; 'notes,': 0.84; 'pythonistas,': 0.84; 'notion': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Python handles globals badly. Date: Sat, 12 Sep 2015 06:54:06 +0100 References: <14afe27e-0bd5-410f-8e64-0f31d496ebf2@googlegroups.com> <55F36B4C.9020007@gmail.com> <1442016698.95299.381478313.2487CA0E@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 195.147.66.69 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442037260 news.xs4all.nl 23813 [2001:888:2000:d::a6]:53958 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96408 On 12/09/2015 06:35, Random832 wrote: > Mark Lawrence writes: >> Let's put it another way, in the 15 years I've been using Python I do >> not recall any experienced Python programmer using "pointer", so what >> makes you think, in 2015, that you are correct and everybody else is >> wrong? I still say that everything in Python is an object, and should >> add that it has one or more things, "names", that are associated with >> it. Hence my preferred analogy about the sticky note. > > So is player3[3] also a name, a sticky note? What if we copy player3 to > another name; does it get two sticky notes, player3[3] and foo[3]? Your > "sticky note" analogy doesn't unify variables/names/whatever you want to > call them with other places that you can assign stuff to, and it implies > that the objects themselves have knowledge of their "names", and that > names are global (if I have two functions each with a result variable, > does that mean there are two different result sticky notes?) > > It doesn't matter that a pointer isn't what it's *called*, it's what it > *is*. And it's not an object, because you can copy it to more than one > place with only one object. > There is NO CONCEPT in Python of a "pointer". player3[3] is the fourth item of a list or similar, or a reference to something in a dictionary, but regardless of the type it is an object that has a name player3. player3 then gets copied to foo. Both names are referring to the same object. It certainly DOES NOT imply anything about objects having knowledge of their names and it DOES NOT say anything about the scope of names. As for "two functions each with a result variable" I haven't the faintest notion what you could be talking about, would you please explain for the benefit of everybody reading this thread. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence