MCPcopy Create free account
hub / github.com/nodejs/node / new_context

Method new_context

tools/inspector_protocol/jinja2/environment.py:1055–1064  ·  view source on GitHub ↗

Create a new :class:`Context` for this template. The vars provided will be passed to the template. Per default the globals are added to the context. If shared is set to `True` the data is passed as it to the context without adding the globals. `locals` can be a di

(self, vars=None, shared=False, locals=None)

Source from the content-addressed store, hash-verified

1053 'version of Python')
1054
1055 def new_context(self, vars=None, shared=False, locals=None):
1056 """Create a new :class:`Context` for this template. The vars
1057 provided will be passed to the template. Per default the globals
1058 are added to the context. If shared is set to `True` the data
1059 is passed as it to the context without adding the globals.
1060
1061 `locals` can be a dict of local variables for internal usage.
1062 """
1063 return new_context(self.environment, self.name, self.blocks,
1064 vars, shared, self.globals, locals)
1065
1066 def make_module(self, vars=None, shared=False, locals=None):
1067 """This method works like the :attr:`module` attribute when called

Callers 8

renderMethod · 0.95
generateMethod · 0.95
make_moduleMethod · 0.95
generate_asyncFunction · 0.45
render_asyncFunction · 0.45
make_module_asyncFunction · 0.45
__call__Method · 0.45
renderMethod · 0.45

Calls 1

new_contextFunction · 0.90

Tested by

no test coverage detected