barry@zope.com (Barry A. Warsaw) writes: > >>>>> "BH" == Bernhard Herzog <bh@intevation.de> writes: > > | doc.BeginTransaction() > | try: > | try: > | something() > | except: > | # an error occurred part way through. make sure everything > | # is reverted (sort of a rollback) > | doc.AbortTransaction() > | finally: > | doc.EndTransaction() > > Interesting. I have similar idioms that I use, except that I > invariably would add bare raise after the AbortTransaction(). That's more or less what AbortTransaction does when it's finished. Bernhard -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://www.mapit.de/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4