def __init__(self, env=None):
# Global scope
self._globals = env if env is not None else {}
# Local scope(s)
self._locals = None
self._locals_stack = []
# Variables which are references to entries in global scope
self._globalrefs = None
self._globalrefs_stack = []
# Current scope (globals + locals in all embedding and in current scope)
self._scope = self._globals
# Turn on restricted mode
self._restrict_builtins()
评论列表
文章目录