- Databases have a new method, transaction, that can be used with the
Python (2.5 and later) with statement:: db = ZODB.DB(...) with db.transaction() as conn: # ... do stuff with conn This uses a private transaction manager for the connection. If control exists the block without an error, the transaction is committed, otherwise, it is aborted. - Connections now have a public ``opened`` attribute that is true when the connection is open, and false otherwise. When true, it is the seconds since the epoch (time.time()) when the connection was opened. This is a renaming of the previous ``_opened`` private variable.
Showing
Please register or sign in to comment