Re: Multiple assignment and the expression on the right side

2006-02-21 Thread Terry Hancock
On Tue, 21 Feb 2006 10:53:21 +0530 Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: > I read in "Python in a Nutshell" that when we have > multiple assignments > made on a single line, it is equivalent to have those many > simple assignments and that the right side is evaluated > once fo

Re: Multiple assignment and the expression on the right side

2006-02-21 Thread Alex Martelli
Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: ... > I think I got confused because of "Each time" in the sentence which > gives a feeling that it gets executed several times. Maybe, It could > have been just written, "When the statement gets executed, the right > hand side is evaluated once,

Re: Multiple assignment and the expression on the right side

2006-02-20 Thread Suresh Jeevanandam
Alex Martelli wrote: > Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: > >> Dear all, >> I read in "Python in a Nutshell" that when we have multiple assignments >> made on a single line, it is equivalent to have those many simple >> assignments and that the right side is evaluated once for ea

Re: Multiple assignment and the expression on the right side

2006-02-20 Thread Andrea Griffini
While I think that the paragraph is correct still there is IMO indeed the (low) risk of such a misunderstanding. The problem is that "the statement executes" can IMO easily be understood as "the statements execute" (especially if your background includes only languages where there's no multiple ass

Re: Multiple assignment and the expression on the right side

2006-02-20 Thread Alex Martelli
Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: > Dear all, > I read in "Python in a Nutshell" that when we have multiple assignments > made on a single line, it is equivalent to have those many simple > assignments and that the right side is evaluated once for each > assignment. [The wordin

Re: Multiple assignment and the expression on the right side

2006-02-20 Thread Robert Kern
Suresh Jeevanandam wrote: > Dear all, > I read in "Python in a Nutshell" that when we have multiple assignments > made on a single line, it is equivalent to have those many simple > assignments and that the right side is evaluated once for each > assignment. [The wordings are mine. I am no

Multiple assignment and the expression on the right side

2006-02-20 Thread Suresh Jeevanandam
Dear all, I read in "Python in a Nutshell" that when we have multiple assignments made on a single line, it is equivalent to have those many simple assignments and that the right side is evaluated once for each assignment. [The wordings are mine. I am not sure if this is what he intende