#NEWLINE# def __enter__( self ) : #NEWLINE# #INDENT# assert ( not hasattr ( self , 'originals' ) ) #NEWLINE# self . originals = originals = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( name , value ) in self . changes . iteritems ( ) : #NEWLINE# #INDENT# originals [ name ] = getattr ( self . target , value , _UNDEFINED ) #NEWLINE# setattr ( self . target , name , value )