MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / discard

Function discard

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

Source from the content-addressed store, hash-verified

1349 return add
1350
1351 def discard(fn):
1352 def discard(self, value, _sa_initiator=None):
1353 # testlib.pragma exempt:__hash__
1354 if value in self:
1355 __del(self, value, _sa_initiator, NO_KEY)
1356 # testlib.pragma exempt:__hash__
1357 fn(self, value)
1358
1359 _tidy(discard)
1360 return discard
1361
1362 def remove(fn):
1363 def remove(self, value, _sa_initiator=None):

Callers

nothing calls this directly

Calls 2

__delFunction · 0.85
_tidyFunction · 0.85

Tested by

no test coverage detected