Edgewall Software

Changes between Initial Version and Version 1 of Ticket #9536, comment 5


Ignore:
Timestamp:
Sep 13, 2010, 10:42:04 PM (12 years ago)
Author:
Remy Blank

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9536, comment 5

    initial v1  
    55
    66 * 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.
    88 * 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.)