Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ setdefault
Method
setdefault
Lib/os.py:759–762 ·
view source on GitHub ↗
(self, key, value)
Source
from the content-addressed store, hash-verified
757
return
dict(self)
758
759
def
setdefault(self, key, value):
760
if
key not in self:
761
self[key] = value
762
return
self[key]
763
764
def
__ior__(self, other):
765
self.update(other)
Callers
15
write_documents
Method · 0.45
add_event
Method · 0.45
run
Function · 0.45
run
Function · 0.45
locale.py
File · 0.45
translation
Function · 0.45
get_importer
Function · 0.45
__init__
Method · 0.45
AddPackagePath
Function · 0.45
__set_name__
Method · 0.45
__new__
Method · 0.45
_add_value_alias_
Method · 0.45
Calls
no outgoing calls
Tested by
1
register_optionflag
Function · 0.36