[New-bugs-announce] [issue3400] dis module: undocumented new bytecodes

Terry J. Reedy report at bugs.python.org
Fri Jul 18 00:24:17 CEST 2008


New submission from Terry J. Reedy <tjreedy at udel.edu>:

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

Suggestion: After entry for UNPACK_SEQUENCE(count), add
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.

I deduced this because *a,b; a,*b; *a,b,c; a,*b,c; and a,b,*c as targets
produce byte pairs of 0,1; 1,0; 0,2; 1,1; and 2,0 (arguments 256, 1,
512, 257, and 2).

The other three are new since 2.5 but do not make much sense to me.  I
will ask on pydev for clarification.  I do not have 2.6 to check its
version of .opname to determine which of these belong there too.

----------
assignee: georg.brandl
components: Documentation
messages: 69918
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: dis module: undocumented new bytecodes
versions: Python 2.6, Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3400>
_______________________________________


More information about the New-bugs-announce mailing list