(self, exc_type, exc_val, exc_tb)
| 27 | return self |
| 28 | |
| 29 | def __exit__(self, exc_type, exc_val, exc_tb): |
| 30 | # Remove all listeners |
| 31 | for engine, listener in self._listeners: |
| 32 | event.remove(engine, "before_cursor_execute", listener) |
| 33 | self._listeners.clear() |
| 34 | |
| 35 | def _listener(self, bind_key): |
| 36 | """Create a listener function that captures the bind_key in its closure.""" |