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)
| 1106 | |
| 1107 | |
| 1108 | def __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 | |
| 1123 | def __before_pop(collection, _sa_initiator=None): |
no test coverage detected