MCPcopy Index your code
hub / github.com/nodejs/node / module

Method module

tools/inspector_protocol/jinja2/environment.py:1093–1106  ·  view source on GitHub ↗

The template as module. This is used for imports in the template runtime but is also useful if one wants to access exported template variables from the Python layer: >>> t = Template('{% macro foo() %}42{% endmacro %}23') >>> str(t.module) '23' >>> t

(self)

Source from the content-addressed store, hash-verified

1091
1092 @property
1093 def module(self):
1094 """The template as module. This is used for imports in the
1095 template runtime but is also useful if one wants to access
1096 exported template variables from the Python layer:
1097
1098 >>> t = Template('{% macro foo() %}42{% endmacro %}23')
1099 >>> str(t.module)
1100 '23'
1101 >>> t.module.foo() == u'42'
1102 True
1103
1104 This attribute is not available if async mode is enabled.
1105 """
1106 return self._get_default_module()
1107
1108 def get_corresponding_lineno(self, lineno):
1109 """Return the source line number of a line number in the

Calls 1

_get_default_moduleMethod · 0.95

Tested by

no test coverage detected