"Lie Ryan" <[email protected]> wrote
I was a bit surprised this doesn't work though:
a, b += k, k
What would you expect?
Remember that
a,b = c,d
is just tuple assignment without using parens (and parens are not part of
the tuple definition)
So using tuples
a,b += k,k
would unwrap as
a,b = (a,b) + (k,k) -> (a,b,k,k)
which should give an error since we are then unpacking 4 values
into two...
It doesn't really make sense.
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor