[Tutor] Reading a Text File with tkFileDialog, askopenfilename+enumerate

Lie Ryan lie.1296 at gmail.com
Mon Feb 16 12:35:55 CET 2009


On Sun, 2009-02-15 at 21:29 +0100, tutor-request at 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>



More information about the Tutor mailing list