MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __delitem__

Function __delitem__

lib/sqlalchemy/orm/collections.py:1154–1169  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

1152 return __setitem__
1153
1154 def __delitem__(fn):
1155 def __delitem__(self, index):
1156 if not isinstance(index, slice):
1157 item = self[index]
1158 __del(self, item, None, index)
1159 fn(self, index)
1160 else:
1161 # slice deletion requires __getslice__ and a slice-groking
1162 # __getitem__ for stepped deletion
1163 # note: not breaking this into atomic dels
1164 for item in self[index]:
1165 __del(self, item, None, index)
1166 fn(self, index)
1167
1168 _tidy(__delitem__)
1169 return __delitem__
1170
1171 def extend(fn):
1172 def extend(self, iterable):

Callers

nothing calls this directly

Calls 2

__delFunction · 0.85
_tidyFunction · 0.85

Tested by

no test coverage detected