Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: scope of function parameters References: <94fdk7FihlU1@mid.individual.net> 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-pubkey.asc X-Post-From: Ben Finney Date: Mon, 30 May 2011 07:42:19 +1000 Message-ID: <87tycd89qc.fsf@benfinney.id.au> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:xWe0uiDSZhZ6adpnFyRvRPTKZBE= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 27 Organization: Unlimited download news at news.astraweb.com NNTP-Posting-Host: efb3acbd.news.astraweb.com X-Trace: DXC=JC9W?]flih=6k]7j^a\l<5L?0kYOcDh@:N7:H2`MmAU3BV[_EIl5[h?]G;2>V^?kW3bEW9A[5UK?5NZ[SL`C\Kg3oXc2B9OBYl0 Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6583 Peter Pearson writes: > Python works in terms of objects having names, and one > object can have many names. Or no names. So it's less accurate (though better than talking of “variables”) to speak of Python objects “having names”. > The names b and c aren't boxes that hold things, they are -- in the > words of one of this group's old hands -- sticky-note labels that have > been slapped on the same object. Right. And in that analogy, the object *still* doesn't “have a name” (since that implies the false conclusion that the object knows its own name); rather, the name is bound to the object, and the object is oblivious of this. I prefer to talk not of sticky notes, but paper tags with string; the string leading from tag to object is an important part, and the paper tag might not even have a name written on it, allowing the same analogy to work for other non-name references like list indices etc. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but where are we going to find a duck and a hose at this | _o__) hour?” —_Pinky and The Brain_ | Ben Finney