From: Scott Gasch Date: Tue, 18 Oct 2022 17:25:47 +0000 (-0700) Subject: Better explain what the heck is going on in deferred_operand.py. X-Git-Url: https://wannabe.guru.org/gitweb/?a=commitdiff_plain;h=3af51feb33c2e76e57e852aa6ce7eb6e35ccc736;p=pyutils.git Better explain what the heck is going on in deferred_operand.py. --- diff --git a/src/pyutils/parallelize/deferred_operand.py b/src/pyutils/parallelize/deferred_operand.py index 2260b29..b06d23a 100644 --- a/src/pyutils/parallelize/deferred_operand.py +++ b/src/pyutils/parallelize/deferred_operand.py @@ -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