# multiarg assignment in a for-statement on a List class ListTest def main is shared d = ListTest() d.ma1 d.ooRange def ma1 l2s = [[1, 2], [3, 4], [5, 6]] for l in l2s l1, l2 = l assert l1 in [1, 3, 5] assert l2 in [2, 4, 6] #print 'l1=[l1], l2=[l2]' assert l1 == 5 assert l2 == 6 # existing variables for l1, l2 in l2s assert l1 in [1, 3, 5] assert l2 in [2, 4, 6] assert l1 == 5 assert l2 == 6 #new variables for l3, l4 in l2s assert l3 in [1, 3, 5] assert l4 in [2, 4, 6] assert l3 == 5 assert l4 == 6 for l5, l6 in [[0, 1], [1, 2], [2, 3]] assert l5 in [0, 1, 2] assert l6 in [1, 2, 3] assert l5 == 2 assert l6 == 3 def ooRange l2s = [[1, 2], [3, 4], [5, 6]] expect ArgumentOutOfRangeException # ?? multi-arg list size mismatch? for l1, l2, l3 in l2s assert l1 in [1, 3, 5] assert l2 in [2, 4, 6] assert l3 == 0 # test for assignment from a flatlist done in 800-errors/300-statements