MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / clear

Function clear

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

Source from the content-addressed store, hash-verified

1198 return pop
1199
1200 def clear(fn):
1201 def clear(self, index=-1):
1202 for item in self:
1203 __del(self, item, None, index)
1204 fn(self)
1205
1206 _tidy(clear)
1207 return clear
1208
1209 # __imul__ : not wrapping this. all members of the collection are already
1210 # present, so no need to fire appends... wrapping it with an explicit

Callers

nothing calls this directly

Calls 3

__delFunction · 0.85
_tidyFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected