MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / __delitem__

Method __delitem__

cassandra/util.py:721–728  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

719 raise KeyError(str(key))
720
721 def __delitem__(self, key):
722 # not efficient -- for convenience only
723 try:
724 index = self._index.pop(self._serialize_key(key))
725 self._index = dict((k, i if i < index else i - 1) for k, i in self._index.items())
726 self._items.pop(index)
727 except KeyError:
728 raise KeyError(str(key))
729
730 def __iter__(self):
731 for i in self._items:

Callers

nothing calls this directly

Calls 3

_serialize_keyMethod · 0.95
popMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected