Re: Python's Reference And Internal Model Of Computing Languages

2010-02-05 Thread Steven D'Aprano
On Fri, 05 Feb 2010 09:53:33 -0600, David Thole wrote: > I read thisand am a tiny bit confused about the actual problem. > > It's not exactly complex to realize that something like: a = b = array > that a and b both point to the array. > > Logically speaking, I'm not sure how one could assum

Re: Python's Reference And Internal Model Of Computing Languages

2010-02-05 Thread Tad McClellan
["Followup-To:" header set to comp.lang.perl.misc.] Jürgen Exner wrote: > David Thole wrote in comp.lang.perl.misc: >>I read thisand am a tiny bit confused about the actual problem. >> >>It's not exactly complex to realize that something like: >>a = b = array >>that a and b both point to th

Re: Python's Reference And Internal Model Of Computing Languages

2010-02-05 Thread J�rgen Exner
David Thole wrote in comp.lang.perl.misc: >I read thisand am a tiny bit confused about the actual problem. > >It's not exactly complex to realize that something like: >a = b = array >that a and b both point to the array. ??? What are you talking about? First of all you should post actual code

Re: Python's Reference And Internal Model Of Computing Languages

2010-02-05 Thread David Thole
I read thisand am a tiny bit confused about the actual problem. It's not exactly complex to realize that something like: a = b = array that a and b both point to the array. Logically speaking, I'm not sure how one could assume that the same assignment would yield a and b point to the same dup

Re: Python's Reference And Internal Model Of Computing Languages

2010-02-02 Thread Gib Bogle
Paul Rubin wrote: Ryan Kelly writes: I know, I know, do not feed the trolls. But this is just so *wrong* that I can't help myself. See: http://xkcd.com/386/ :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Reference And Internal Model Of Computing Languages

2010-02-02 Thread Xah Lee
()On Feb 2, 6:46 pm, Ryan Kelly wrote: > > On Tue, 2010-02-02 at 17:28 -0800, Xah Lee wrote: > > I know, I know, do not feed the trolls.  But this is just so *wrong* > that I can't help myself. > > > In Python, there are 2 ways to clear a hash: > > No, no there's not.  There's one way to clear

Re: Python's Reference And Internal Model Of Computing Languages

2010-02-02 Thread Paul Rubin
Ryan Kelly writes: > I know, I know, do not feed the trolls. But this is just so *wrong* > that I can't help myself. See: http://xkcd.com/386/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Reference And Internal Model Of Computing Languages

2010-02-02 Thread Ryan Kelly
> On Tue, 2010-02-02 at 17:28 -0800, Xah Lee wrote: I know, I know, do not feed the trolls. But this is just so *wrong* that I can't help myself. > In Python, there are 2 ways to clear a hash: No, no there's not. There's one way to clear a hash and there's one way to assign a new object to a

Python's Reference And Internal Model Of Computing Languages

2010-02-02 Thread Xah Lee
just wrote this essay. Comment & feedback very welcome. Python's Reference And Internal Model Of Computing Languages Xah Lee, 2010-02-02 In Python, there are 2 ways to clear a hash: “myHash = {}” and “myHash.clear()”. What is the difference? ↓ The difference is that “m