Ñò +z2Wc@sfdZddkZddkZdZd„Zdefd„ƒYZdeefd„ƒYZd Z dS( sÀ Transactions of attributes by inheriting the Transaction class Basic Usage: class Test(Transaction): pass a = Test() a.test = "old state" a.commit() a.test = "bad state, roll me back" a.rollback() assert(a.test == "old state") See also: http://www.harald-hoyer.de/linux/pythontransactionclass Copyright (C) 2008 Harald Hoyer Copyright (C) 2008 Red Hat, Inc. iÿÿÿÿNicCs#||jotS|i|ƒtS(s"checks and sets the obj id in seen(tTruetaddtFalse(twhattseen((s:/usr/share/system-config-network/netconfpkg/transaction.pyt _checksetseen+s  t TransactioncBs2eZdZd„Zd„Zd„Zd„ZRS(sn This class allows sub-classes to commit changes to an instance to a history, and rollback to previous states. Because the class only stores attributes in self.__dict__ sub-classes need to use the methods __getstate__ and __setstate__ to provide additional state information. See the Transactionlist below for an example usage. cKsCtitd|iiƒ|idtƒƒ}tt|ƒ|ƒodS|idt ƒ}t ƒ}xŸ|i i ƒD]Ž\}}t |tƒo)|||<|o|id|ƒqqt|djo|||( R3RR RRtobjectRtlistR4t __author__(((s:/usr/share/system-config-network/netconfpkg/transaction.pyt#s   š\