[Python-3000] Undocumented new bytecodes (issue 3400)

Terry Reedy tjreedy at udel.edu
Fri Jul 18 00:38:00 CEST 2008


http://bugs.python.org/issue3400

dis / Python Bytecode Instructions doc is missing entries for
UNPACK_EX
STORE_LOCALS
LOAD_BUILD_CLASS
MAKE_BYTES
which appear in dis.opname (3.0 version).

Based on examples, I suggested that the UNPACK_SEQUENCE entry be followed by

UNPACK_EX(bytepair)
Used for starred assignment.  Similar to UNPACK_SEQUENCE except 1) the
lo and hi bytes of the argument are the number of unstarred targets
before and after the starred target and 2) the values between the first
lo and last hi are collected into a list for the starred target.

Could a bytecode expert confirm the above and confirm the validity* of 
and suggest entries for the other three?

*(I am puzzled by MAKE_BYTES especially since there is otherwise only 
MAKE_FUNCTION and _CLOSURE but BUILD_MAP, _SET, _LIST, _TUPLE, _SLICE, 
and _CLASS and neither for _STRING)

Terry Jan Reedy



More information about the Python-3000 mailing list