python-xdis icon indicating copy to clipboard operation
python-xdis copied to clipboard

xdis.std.Instruction should not take "has_arg" parameter #86

Open rocky opened this issue 8 years ago • 0 comments

Although we want has_stdarg in the underlying bytecode instruction, in in std.Instruction() it shouldn't be passed as a parameter but computed based on the opc, e.g. has_arg = opname >= opc.HAVE_ARGUMENT.

In an ideal world, fields argrepr and opname wouldn't need to be passed in std.Instruction(). We could either create another function or have setting these to be None to mean that they get filled in. And opname probably should be checked against opcode.

rocky avatar Mar 19 '17 18:03 rocky