Ejemplo n.º 1
0
 def __setattr__(self, name, value):
   """Support self.foo = checkpointable syntax."""
   if getattr(self, "_setattr_tracking", True):
     value = data_structures.sticky_attribute_assignment(
         checkpointable=self, value=value, name=name)
   super(Checkpointable, self).__setattr__(name, value)
Ejemplo n.º 2
0
 def __setattr__(self, name, value):
     """Support self.foo = checkpointable syntax."""
     if getattr(self, "_setattr_tracking", True):
         value = data_structures.sticky_attribute_assignment(
             checkpointable=self, value=value, name=name)
     super(Checkpointable, self).__setattr__(name, value)