SHARE
TWEET

Untitled

a guest Apr 19th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     def load_name_op(self, arg):
  2.         """
  3.        Partial realization
  4.  
  5.        Operation description:
  6.            https://docs.python.org/3/library/dis.html#opcode-LOAD_NAME
  7.  
  8.        Operation realization:
  9.            https://github.com/python/cpython/blob/3.7/Python/ceval.c#L2057
  10.        """
  11.         if arg in self.locals:
  12.             val = self.locals[arg]
  13.         elif arg in self.globals:
  14.             val = self.globals[arg]
  15.         elif arg in self.builtins:
  16.             val = self.builtins[arg]
  17.         else:
  18.             raise NameError("name '%s' is not defined" % name)
  19.         self.push(val)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top