Changes between Initial Version and Version 1 of Ticket #9536, comment 5
- Timestamp:
- Sep 13, 2010, 10:42:04 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9536, comment 5
initial v1 5 5 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 * Does it make sense to use "private" attributes like `_env` and `_db`, when the context manager won't ever be accessible to the users ? I would prefer dropping the underscores.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 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.)