Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-10 Thread Ben Sizer
Alex Martelli wrote: > Ben Sizer <[EMAIL PROTECTED]> wrote: >... > > assignment semantics that differ from languages such as C++ and Java, > > not the calling mechanism. In C++, assignment means copying a value. In > > Python, assignment means reassigning a reference. > > And in Java, it means

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: > This is where we disagree. I think their understanding of references > is dead on. What's broken is their understanding of what variables are > and what assignments mean. Once you fix that, the rest falls into > place. > > (Steven D'Aprano wrote:) > > The fact that call by objec

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: > This is where we disagree. I think their understanding of references > is dead on. What's broken is their understanding of what variables are > and what assignments mean. Once you fix that, the rest falls into > place. > > (Steven D'Aprano wrote:) > > The fact that call by objec

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: > This is where we disagree. I think their understanding of references > is dead on. What's broken is their understanding of what variables are > and what assignments mean. Once you fix that, the rest falls into > place. > > (Steven D'Aprano wrote:) > > The fact that call by objec

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: > This is where we disagree. I think their understanding of references > is dead on. What's broken is their understanding of what variables are > and what assignments mean. Once you fix that, the rest falls into > place. > > (Steven D'Aprano wrote:) > > The fact that call by objec

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Alex Martelli
Ben Sizer <[EMAIL PROTECTED]> wrote: ... > assignment semantics that differ from languages such as C++ and Java, > not the calling mechanism. In C++, assignment means copying a value. In > Python, assignment means reassigning a reference. And in Java, it means just the same as in Python (with s

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-05 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Thu, 05 Jan 2006 11:17:44 -0500, Mike Meyer wrote: >> While telling them that "You can't do call by reference because Python >> is call by object" may be correct, > Good to see you finally concede it. I'm not conceeding anything, because I never sa

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-05 Thread Steven D'Aprano
On Thu, 05 Jan 2006 11:17:44 -0500, Mike Meyer wrote: > While telling them that "You can't do call by reference because Python > is call by object" may be correct, Good to see you finally concede it. > it leaves out the critical information. As does "call by reference" or "call by value". No t

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-05 Thread Mike Meyer
"Ben Sizer" <[EMAIL PROTECTED]> writes: > But, if you separate the calling mechanism from the assignment > mechanism, then Python does behave like every other call by reference > language. The problem is that people expect to then be able to change > the value of the referred object with the assign

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-05 Thread Ben Sizer
Steven D'Aprano wrote: > > On reading back over my post, I realise that it might > sound like I was mad at KraftDiner. My apologies -- I'm > not, I feel (s)he is the victim of incorrect > information here, not the culprit. > > After all, as a Python newbie, how is KraftDiner > supposed to know that

Apology Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Steven D'Aprano
Steven D'Aprano wrote: > On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote: >>I though the contents of lst would be modified.. (After reading that >>'everything' is a refrence.) > > See, this confusion is precisely why I get the urge to slap people who > describe Python as "call by reference"