as_context caching

This commit is contained in:
Dave Halter committed 2019-08-18 17:52:15 +02:00
1 parent 8e60689bcf
commit 6fb49eaadf
10 files changed
+42 -33

No files matched your search

+4
View File
@@ -222,7 +222,11 @@ class Value(HelperValueMixin, BaseValue):
# The root value knows if it's a stub or not.
return self.parent_context.is_stub()
@memoize_method
def as_context(self):
return self._as_context()
def _as_context(self):
raise NotImplementedError('Not all values need to be converted to contexts')