[Python-Dev] A Hygienic Macro System in Python?

Bernhard Herzog bh@intevation.de
20 Mar 2002 12:12:00 +0100


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/

AltStyle によって変換されたページ (->オリジナル) /