projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Easier and more self documenting patterns for loading/saving Persistent
[python_utils.git]
/
deferred_operand.py
diff --git
a/deferred_operand.py
b/deferred_operand.py
index 1de2bfb0931ffa8b9bfdd754e7ac00ad3551af90..9edbb9e8072b451ffc13f447235e3da5505bcff6 100644
(file)
--- a/
deferred_operand.py
+++ b/
deferred_operand.py
@@
-1,8
+1,12
@@
#!/usr/bin/env python3
#!/usr/bin/env python3
+# © Copyright 2021-2022, Scott Gasch
+
"""This is a helper class that tries to define every __dunder__ method
so as to defer that evaluation of an object as long as possible. It
"""This is a helper class that tries to define every __dunder__ method
so as to defer that evaluation of an object as long as possible. It
-is used by smart_future.py as a base class."""
+is used by smart_future.py as a base class.
+
+"""
from abc import ABC, abstractmethod
from typing import Any, Generic, TypeVar
from abc import ABC, abstractmethod
from typing import Any, Generic, TypeVar
@@
-15,7
+19,8
@@
T = TypeVar('T')
class DeferredOperand(ABC, Generic[T]):
"""A wrapper around an operand whose value is deferred until it is
class DeferredOperand(ABC, Generic[T]):
"""A wrapper around an operand whose value is deferred until it is
- needed. See subclass SmartFuture for an example usage.
+ needed (i.e. accessed). See the subclass :class:`SmartFuture` for
+ an example usage and/or a more useful patten.
"""
@abstractmethod
"""
@abstractmethod