]> granicus.if.org Git - python/commit
eval_code2(): collapsed the implementations of UNPACK_TUPLE and
authorBarry Warsaw <barry@python.org>
Mon, 25 Aug 1997 22:13:04 +0000 (22:13 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 25 Aug 1997 22:13:04 +0000 (22:13 +0000)
commite42b18f9d1fca06df34d9fcbd54a2a6045329197
tree83a1d23ce04aadad0aae0aa35a59a62de9b15b0e
parent1fb071cc648aa5e72f7c9aa6a230cb826bb8eed3
eval_code2(): collapsed the implementations of UNPACK_TUPLE and
UNPACK_LIST byte codes and added a third code path that allows
generalized sequence unpacking.  Now both syntaxes:

    a, b, c = seq
    [a, b, c] = seq

can be used to unpack any sequence with the exact right number of
items.

unpack_sequence(): out-lined implementation of generalized sequence
unpacking.  tuple and list unpacking are still inlined.
Python/ceval.c