MCPcopy
hub / github.com/celery/celery / setdefault

Method setdefault

celery/utils/collections.py:293–297  ·  view source on GitHub ↗
(self, key, default=None)

Source from the content-addressed store, hash-verified

291 __nonzero__ = __bool__ # Py2
292
293 def setdefault(self, key, default=None):
294 # type: (Any, Any) -> None
295 key = self._key(key)
296 if key not in self:
297 self[key] = default
298
299 def update(self, *args, **kwargs):
300 # type: (*Any, **Any) -> Any

Callers 15

test_setdefaultMethod · 0.45
create_stateMethod · 0.45
create_messageFunction · 0.45
add_revokedMethod · 0.45
test_nulldictMethod · 0.45
_get_unsorted_listMethod · 0.45
_get_sorted_setMethod · 0.45
manage.pyFile · 0.45
celery.pyFile · 0.45
wsgi.pyFile · 0.45
__call__Method · 0.45

Calls 1

_keyMethod · 0.95

Tested by 8

test_setdefaultMethod · 0.36
create_stateMethod · 0.36
create_messageFunction · 0.36
add_revokedMethod · 0.36
test_nulldictMethod · 0.36
_get_unsorted_listMethod · 0.36
_get_sorted_setMethod · 0.36