We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I see this PR which adds support for memoizing None #17 but it seems that some refactoring later might have broken it?
>>> python ./manage.py shell from memoize import memoize @memoize() def a(x): print 'a not memoized' if x == 1: return None return 'foo' a(2) a(2) a(1) a(1)
Seems to be cause by cache.get specifying a default if None is the value:
cache.get
None
def get(self, key): "Proxy function for internal cache object." return self.cache.get(key=key, default=self.default_cache_value)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I see this PR which adds support for memoizing None #17 but it seems that some refactoring later might have broken it?
Seems to be cause by
cache.get
specifying a default ifNone
is the value:The text was updated successfully, but these errors were encountered: