def BUILD_LIST_FROM_ARG(self, _): # This opcode was added with pypy-1.8. Here is a simpler # version, enough for annotation. last_val = self.popvalue() self.pushvalue(op.newlist().eval(self)) self.pushvalue(last_val)
def BUILD_LIST(self, itemcount): items = self.popvalues(itemcount) w_list = op.newlist(*items).eval(self) self.pushvalue(w_list)