On 1/30/07, Steve Nelson <[EMAIL PROTECTED]> wrote:
> > x, y = y, x
>
> Doesn't this use temporary variables?

Python doesn't really *have* variables, as such, so no. What it does
is to create a tuple referring to the objects (or just possibly one
object) referred to by the names 'y' and 'x', then re-binds the
objects from the tuple to the names 'x' and 'y' respectively.

Reset your brain! <http://effbot.org/zone/python-objects.htm>

-- 
Cheers,
Simon B
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to