MCPcopy 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
2000def _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
2009def _patch_stopall():

Callers 2

_patch_dictMethod · 0.85
_unpatch_dictMethod · 0.85

Calls 2

listClass · 0.85
clearMethod · 0.45

Tested by

no test coverage detected