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

Function __del

lib/sqlalchemy/orm/collections.py:1108–1120  ·  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

1106
1107
1108def __del(collection, item, _sa_initiator, key):
1109 """Run del events.
1110
1111 This event occurs before the collection is actually mutated, *except*
1112 in the case of a pop operation, in which case it occurs afterwards.
1113 For pop operations, the __before_pop hook is called before the
1114 operation occurs.
1115
1116 """
1117 if _sa_initiator is not False:
1118 executor = collection._sa_adapter
1119 if executor:
1120 executor.fire_remove_event(item, _sa_initiator, key=key)
1121
1122
1123def __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