diff --git a/src/propcache/_helpers_c.pyx b/src/propcache/_helpers_c.pyx index 5369e12..a743dc2 100644 --- a/src/propcache/_helpers_c.pyx +++ b/src/propcache/_helpers_c.pyx @@ -27,11 +27,10 @@ cdef class under_cached_property: def __get__(self, inst, owner): if inst is None: return self - cdef dict cache = inst._cache - val = cache.get(self.name, _sentinel) + val = (inst._cache).get(self.name, _sentinel) if val is _sentinel: val = self.wrapped(inst) - cache[self.name] = val + (inst._cache)[self.name] = val return val def __set__(self, inst, value):