Exemple #1
0
 def __exit__(self, _type, _value, _tb):
     """
     Restore the algo instance stored in __enter__.
     """
     set_algo_instance(self.old_algo_instance)
 def __exit__(self, _type, _value, _tb):
     """
     Restore the algo instance stored in __enter__.
     """
     set_algo_instance(self.old_algo_instance)
Exemple #3
0
 def __enter__(self):
     """
     Set the given algo instance, storing any previously-existing instance.
     """
     self.old_algo_instance = get_algo_instance()
     set_algo_instance(self.algo_instance)
 def __enter__(self):
     """
     Set the given algo instance, storing any previously-existing instance.
     """
     self.old_algo_instance = get_algo_instance()
     set_algo_instance(self.algo_instance)