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

Method setdefault

deps/v8/third_party/jinja2/utils.py:470–478  ·  view source on GitHub ↗

Set `default` if the key is not in the cache otherwise leave unchanged. Return the value of this key.

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

Source from the content-addressed store, hash-verified

468 return default
469
470 def setdefault(self, key: t.Any, default: t.Any = None) -> t.Any:
471 """Set `default` if the key is not in the cache otherwise
472 leave unchanged. Return the value of this key.
473 """
474 try:
475 return self[key]
476 except KeyError:
477 self[key] = default
478 return default
479
480 def clear(self) -> None:
481 """Clear the cache."""

Callers 14

BuildGraphConfigsFunction · 0.45
MainFunction · 0.45
ClangTidyRunAggregateFunction · 0.45
HttpJSONQueryFunction · 0.45
BuildTargetMethod · 0.45
merge_test_runner_outputFunction · 0.45
merge_filesFunction · 0.45
fake_mbwMethod · 0.45
build_rule_directoryFunction · 0.45
ngettextFunction · 0.45
pgettextFunction · 0.45

Calls

no outgoing calls

Tested by 1

fake_mbwMethod · 0.36