summaryrefslogtreecommitdiff
path: root/lib/spack/llnl/util/lang.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/llnl/util/lang.py')
-rw-r--r--lib/spack/llnl/util/lang.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py
index ae75db621f..607b093de8 100644
--- a/lib/spack/llnl/util/lang.py
+++ b/lib/spack/llnl/util/lang.py
@@ -843,27 +843,6 @@ class Singleton:
return repr(self.instance)
-class LazyReference:
- """Lazily evaluated reference to part of a singleton."""
-
- def __init__(self, ref_function):
- self.ref_function = ref_function
-
- def __getattr__(self, name):
- if name == "ref_function":
- raise AttributeError()
- return getattr(self.ref_function(), name)
-
- def __getitem__(self, name):
- return self.ref_function()[name]
-
- def __str__(self):
- return str(self.ref_function())
-
- def __repr__(self):
- return repr(self.ref_function())
-
-
def load_module_from_file(module_name, module_path):
"""Loads a python module from the path of the corresponding file.