Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def load_name_op(self, arg):
- """
- Partial realization
- Operation description:
- https://docs.python.org/3/library/dis.html#opcode-LOAD_NAME
- Operation realization:
- https://github.com/python/cpython/blob/3.7/Python/ceval.c#L2057
- """
- if arg in self.locals:
- val = self.locals[arg]
- elif arg in self.globals:
- val = self.globals[arg]
- elif arg in self.builtins:
- val = self.builtins[arg]
- else:
- raise NameError("name '%s' is not defined" % name)
- self.push(val)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement