Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ _clear_dict
Function
_clear_dict
Lib/unittest/mock.py:2000–2006 ·
view source on GitHub ↗
(in_dict)
Source
from the content-addressed store, hash-verified
1998
1999
2000
def
_clear_dict(in_dict):
2001
try
:
2002
in_dict.clear()
2003
except
AttributeError:
2004
keys = list(in_dict)
2005
for
key in keys:
2006
del in_dict[key]
2007
2008
2009
def
_patch_stopall():
Callers
2
_patch_dict
Method · 0.85
_unpatch_dict
Method · 0.85
Calls
2
list
Class · 0.85
clear
Method · 0.45
Tested by
no test coverage detected