MCPcopy
hub / github.com/pallets/jinja / get

Method get

src/jinja2/utils.py:474–479  ·  view source on GitHub ↗

Return an item from the cache dict or `default`

(self, key: t.Any, default: t.Any = None)

Source from the content-addressed store, hash-verified

472 return rv
473
474 def get(self, key: t.Any, default: t.Any = None) -> t.Any:
475 """Return an item from the cache dict or `default`"""
476 try:
477 return self[key]
478 except KeyError:
479 return default
480
481 def setdefault(self, key: t.Any, default: t.Any = None) -> t.Any:
482 """Set `default` if the key is not in the cache otherwise

Callers 15

get_sourceMethod · 0.45
babel_extractFunction · 0.45
getboolFunction · 0.45
rewrite_traceback_stackFunction · 0.45
get_template_localsFunction · 0.45
_filter_test_commonMethod · 0.45
_load_templateMethod · 0.45
_make_finalizeMethod · 0.45
_filter_test_commonMethod · 0.45
parse_statementMethod · 0.45
_describe_token_typeFunction · 0.45
get_lexerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected