MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __del

Function __del

lib/sqlalchemy/orm/collections.py:1056–1068  ·  view source on GitHub ↗

Run del events. This event occurs before the collection is actually mutated, *except* in the case of a pop operation, in which case it occurs afterwards. For pop operations, the __before_pop hook is called before the operation occurs.

(collection, item, _sa_initiator, key)

Source from the content-addressed store, hash-verified

1054
1055
1056def __del(collection, item, _sa_initiator, key):
1057 """Run del events.
1058
1059 This event occurs before the collection is actually mutated, *except*
1060 in the case of a pop operation, in which case it occurs afterwards.
1061 For pop operations, the __before_pop hook is called before the
1062 operation occurs.
1063
1064 """
1065 if _sa_initiator is not False:
1066 executor = collection._sa_adapter
1067 if executor:
1068 executor.fire_remove_event(item, _sa_initiator, key=key)
1069
1070
1071def __before_pop(collection, _sa_initiator=None):

Callers 7

removeFunction · 0.85
__setitem__Function · 0.85
__delitem__Function · 0.85
popFunction · 0.85
clearFunction · 0.85
popitemFunction · 0.85
discardFunction · 0.85

Calls 1

fire_remove_eventMethod · 0.45

Tested by

no test coverage detected