Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!border3.nntp.dca.giganews.com!backlog3.nntp.dca3.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 10 May 2014 02:46:46 -0500 Date: Sat, 10 May 2014 00:46:45 -0700 From: Larry Hudson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 Newsgroups: comp.lang.python Subject: Re: The =?UTF-8?B?4oCcZG9lcyBQeXRob24gaGF2ZSB2YXJpYWJsZXM/4oCdIGQ=?= =?UTF-8?B?ZWJhdGU=?= 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> <536add6b$0$29965$c3e8da3$5496439d@news.astraweb.com> <536D57E9.5080801@gmail.com> <536d7cdf$0$29980$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <536d7cdf$0$29980$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 48 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-wwdXuhlEwN+WJgWvHSaUWBCbznXo/sUyCgHJeWASzEFtoLBvlZCUoaQIiw14BykBAWSZx5CioRYfN7x!DJvf5Xy65VKaYEP5fRQpIqCEliAMoFCwEPjFD49A0ROdW6sYa3U/0wgsTL2Mpu7ncN7bHJ9ueQ== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4051 Xref: csiph.com comp.lang.python:71229 On 05/09/2014 06:11 PM, Steven D'Aprano wrote: > On Fri, 09 May 2014 17:34:17 -0500, Mark H Harris wrote: > >> On 5/7/14 8:27 PM, Steven D'Aprano wrote: >> Why are new Python coders 'always' confused by this question of >> variable (name value) vs. {name: object} model of Python? > > "Always"? I don't think anyone, not even Ben, claims that new Python > coders are "always" confused about Python's variable semantics. That > would be a straw man, easy to disprove by just finding a single person > who wasn't confused. Perhaps someone who had never learned C and didn't > know C variable semantics? > Well, here is that one person. ;-) I'm an entirely self-taught amateur/hobbyist programmer, coming to Python from a C background. Very early in my reading of books/tutorials on Python I learned that Python variables are different, and how they are different from C variables. Essentially I said, "Okay, they're different. What's next?" There was no confusion at all. All I had to do was accept that they _are_ different. (BTW, I'm now quite hooked on Python -- and still learning it.) >> The reason I suggest is that the person has a preconceived idea of >> what 'variable' means, and they then attempt to apply their conception >> of variable on to Python in some way ending in a surprise. > > That's the problem as some of us see it. > As I said above, not a problem. I already accepted the fact that all programming languages are different -- often with similarities, but more often quite different, especially in the details. So when programming in C I think in C-style variables, in Python I think in Python-style variables. And uv course, I nefer make mmistakes... Yeah, right! ;-) > >> We need a way to speak about Pythons name object model to avoid >> this confusion. > > And that would be the "name binding" part. > This is something I absolutely disagree with. I still think it's only necessary to teach that variables in different languages are handled differently. Insisting on a different name is NOT helpful. And insisting that Python does not have variables is ludicrous! -=- Larry -=-