Hmm... An idea: if a,b==c,d:

Erik Max Francis max at alcyone.com
Mon Nov 18 18:26:16 EST 2002


Brad Hards wrote:

> I think of (oldx, oldy = x,y) as forming a tuple (x,y), and then
> unpacking it
> to oldx and oldy.

That's wise, since that's exactly what it does :-).  In all seriousness,
there is no special syntax involved here; this is simply a result of
tuple construction, tuple unpacking, and the semantics of the assignment
operator.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Who's not sat tense before his own heart's curtain?
\__/ Rainer Maria Rilke
    Maths reference / http://www.alcyone.com/max/reference/maths/
 A mathematics reference.



More information about the Python-list mailing list