Aaron Bentley wrote:

One alternative to using a context manager for transactions is:

    txn = transaction.begin()
    try:
        modify_the_database()
    finally:
        # Ah, everything succeeded.
        txn.commit()

Gah!  The horror!


Jeroen

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to