Commit 5dff65da authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

opcodes: Replace manual loop with map

Also remove a superfluous empty line in test file.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarGuido Trotter <>
parent 16091a6e
......@@ -1340,8 +1340,8 @@ class OpInstanceMultiAlloc(OpCode):
if "instances" in state:
insts = [OpCode.LoadOpCode(inst) for inst in state["instances"]]
state["instances"] = insts
state["instances"] = map(OpCode.LoadOpCode, state["instances"])
return OpCode.__setstate__(self, state)
def Validate(self, set_defaults):
......@@ -297,7 +297,6 @@ class TestOpcodes(unittest.TestCase):
self.assertEqual(op.value2, "world")
self.assertEqual(op.debug_level, 123)
def testOpInstanceMultiAlloc(self):
inst = dict([(name, []) for name in opcodes.OpInstanceCreate.GetAllSlots()])
inst_op = opcodes.OpInstanceCreate(**inst)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment