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

Method setdefault

tools/inspector_protocol/jinja2/utils.py:355–367  ·  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, default=None)

Source from the content-addressed store, hash-verified

353 return default
354
355 def setdefault(self, key, default=None):
356 """Set `default` if the key is not in the cache otherwise
357 leave unchanged. Return the value of this key.
358 """
359 self._wlock.acquire()
360 try:
361 try:
362 return self[key]
363 except KeyError:
364 self[key] = default
365 return default
366 finally:
367 self._wlock.release()
368
369 def clear(self):
370 """Clear the cache."""

Callers 15

ngettextFunction · 0.45
__new__Method · 0.45
UnifyFunction · 0.45
FilterFunction · 0.45
LoadFunction · 0.45
_GetMSBuildToolSettingsFunction · 0.45
_TranslateFunction · 0.45
_GetPdbPathFunction · 0.45
InsertLargePdbShimsFunction · 0.45
CalculateVariablesFunction · 0.45
CalculateVariablesFunction · 0.45
_GetMSBuildAttributesFunction · 0.45

Calls 2

acquireMethod · 0.80
releaseMethod · 0.80

Tested by

no test coverage detected