On Sun, 2009-02-15 at 21:29 +0100, tutor-requ...@python.org wrote:

> Do you know about sequence unpacking? In an assignment statement, when
> the right side is a sequence, the left side can be a list of variables
> of the same length as the sequence. Then each sequence element is
> assigned to one variable. For example

<nitpick>
The left side can only be a tuple of "names". The tuple unpacking is a
little bit of violation of python's object model, since while python's
tuple usually contain objects, in tuple unpacking the tuple contains a
list of names to be assigned.
</nitpick>

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to