def updateglobals(self, **vardict):
'''Update variables in the global scope.
This is a shortcut function to inject protected variables in the global
scope without extensive checks (as in define()). Vardict must not
contain any global entries which can be shadowed in local scopes
(e.g. should only contain variables with forbidden prefix).
Args:
**vardict: variable defintions.
'''
self._scope.update(vardict)
if self._locals is not None:
self._globals.update(vardict)
评论列表
文章目录