Changes between Version 1 and Version 2 of Ticket #9536, comment 5
- Timestamp:
- Sep 13, 2010, 10:43:23 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9536, comment 5
v1 v2 6 6 * Why set `self._env` to `None` after getting the connection? Wouldn't it be more intuitive to set a `_db = None` at class scope, and check for that in `__exit__()` to decide if a commit or rollback is needed? 7 7 * Does it make sense to use "private" attributes like `_env` and `_db`, when the context manager won't ever be accessible to the users anyway? I would prefer dropping the underscores. 8 * I like the idea of preventing commits and rollbacks in query connections, but could we add that functionality to `ConnectionWrapper` instead? (I haven't got time to look now, so correct me if I'm wrong.)8 * I like the idea of preventing commits and rollbacks in query connections, ~~but could we add that functionality to `ConnectionWrapper` instead~~? (I haven't got time to look now, so correct me if I'm wrong.) (Yes, I'm wrong, we probably need another wrapper.)