• Kevin Modzelewski's avatar
    Improve tuple unpacking behavior · b0e93d19
    Kevin Modzelewski authored
    - Use the right unpacking protocol (ie don't check __len__, just try to iterate)
    - Handle unpacking exceptions appropriately
    - Expand the targets of assigns correctly (think: f().x = 1)
    -- this was not just for tuples but came up here first; this also was broken:
    [0 for i in xrange(5)][0] = 1
    (silly but legal)
    b0e93d19
tuple_iteration.py 95 Bytes