MCPcopy Index your code
hub / github.com/python/cpython / _clear_dict

Function _clear_dict

Lib/unittest/mock.py:2007–2013  ·  view source on GitHub ↗
(in_dict)

Source from the content-addressed store, hash-verified

2005
2006
2007def _clear_dict(in_dict):
2008 try:
2009 in_dict.clear()
2010 except AttributeError:
2011 keys = list(in_dict)
2012 for key in keys:
2013 del in_dict[key]
2014
2015
2016def _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

Used in the wild real call sites across dependent graphs

searching dependent graphs…