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)
| 1054 | |
| 1055 | |
| 1056 | def __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 | |
| 1071 | def __before_pop(collection, _sa_initiator=None): |
no test coverage detected