MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / __delitem__

Function __delitem__

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

Source from the content-addressed store, hash-verified

1204 return __setitem__
1205
1206 def __delitem__(fn):
1207 def __delitem__(self, index):
1208 if not isinstance(index, slice):
1209 item = self[index]
1210 __del(self, item, None, index)
1211 fn(self, index)
1212 else:
1213 # slice deletion requires __getslice__ and a slice-groking
1214 # __getitem__ for stepped deletion
1215 # note: not breaking this into atomic dels
1216 for item in self[index]:
1217 __del(self, item, None, index)
1218 fn(self, index)
1219
1220 _tidy(__delitem__)
1221 return __delitem__
1222
1223 def extend(fn):
1224 def extend(self, iterable):

Callers

nothing calls this directly

Calls 2

__delFunction · 0.85
_tidyFunction · 0.85

Tested by

no test coverage detected