MCPcopy Index your code
hub / github.com/RustPython/RustPython / __delitem__

Method __delitem__

Lib/configparser.py:1397–1409  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

1395 setattr(proxy, k, getter)
1396
1397 def __delitem__(self, key):
1398 try:
1399 k = 'get' + (key or None)
1400 except TypeError:
1401 raise KeyError(key)
1402 del self._data[key]
1403 for inst in itertools.chain((self._parser,), self._parser.values()):
1404 try:
1405 delattr(inst, k)
1406 except AttributeError:
1407 # don't raise since the entry was present in _data, silently
1408 # clean up
1409 continue
1410
1411 def __iter__(self):
1412 return iter(self._data)

Callers

nothing calls this directly

Calls 3

delattrFunction · 0.85
chainMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected