Better explain what the heck is going on in deferred_operand.py.
authorScott Gasch <[email protected]>
Tue, 18 Oct 2022 17:25:47 +0000 (10:25 -0700)
committerScott Gasch <[email protected]>
Tue, 18 Oct 2022 17:25:47 +0000 (10:25 -0700)
src/pyutils/parallelize/deferred_operand.py

index 2260b29d1eaf6d3172f601fc7ff9cc921e3c6b21..b06d23a41bc90c99696ee0ce6e0c7ab0afd70f38 100644 (file)
@@ -36,6 +36,16 @@ class DeferredOperand(ABC, Generic[T]):
     """
 
     def __init__(self, local_attributes: Set[str] = None):
+        """
+        Args:
+            local_attributes: because this class attempts to act as a
+                transparent wrapper around a normal Future, it needs
+                to be able to differentiate between attempts to set a
+                property of it/its subclasses or the wrapped object.
+                The local_attributes argument is a set of names that,
+                if we intercept a set operation for, refer to an
+                attribute in the wrapper and not the wrapped class.
+        """
         self.__dict__['local_attributes'] = local_attributes
 
     @abstractmethod