Skip to content
Snippets Groups Projects
Commit f95d75ac authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

ENH: Cache.__contains__ method

parent 8ae241f0
No related branches found
No related tags found
No related merge requests found
......@@ -143,6 +143,13 @@ class Cache(object):
return self.put(key, value)
def __contains__(self, key):
"""Check whether an item is in the cache. Note that the item may
be in the cache, but it may be expired.
"""
return key in self.__cache
def __parseDefault(self, *args, **kwargs):
"""Used by the :meth:`get` method. Parses the ``default`` argument,
which may be specified as either a positional or keyword argumnet.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment