#NEWLINE# @ contextmanager #NEWLINE# def TempAttr( self , name , value ) : #NEWLINE# #INDENT# 'Construct a context manager that temporarily sets an attribute value.\n\n    Args:\n      name: the name of an attribute of this object to be modified temporarily.\n      value: a value to which that attribute is set for the duration of any\n        with statement in which the manager is used.\n\n    Yields:\n      None\n    ' #NEWLINE# old_value = getattr ( self , name ) #NEWLINE# setattr ( self , name , value ) #NEWLINE# ( yield ) #NEWLINE# setattr ( self , name , old_value )