From ac37f096ad2b968a36b42f0db40904f4975a80cf Mon Sep 17 00:00:00 2001 From: Mahmoud Hashemi Date: Mon, 30 Mar 2015 20:11:45 -0700 Subject: [PATCH] have cacheutils use the sentinel factory (looks better in the docs) --- boltons/cacheutils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/boltons/cacheutils.py b/boltons/cacheutils.py index a3f9e36..c48314f 100644 --- a/boltons/cacheutils.py +++ b/boltons/cacheutils.py @@ -21,9 +21,15 @@ except: def __exit__(self, exctype, excinst, exctb): pass +try: + from compat import make_sentinel + _MISSING = make_sentinel(var_name='_MISSING') +except ImportError: + _MISSING = object() + + PREV, NEXT, KEY, VALUE = range(4) # names for the link fields DEFAULT_MAX_SIZE = 128 -_MISSING = object() class LRU(dict):