Fixed python 2.6 compatibility.

This commit is contained in:
Omer Katz 2015-08-18 12:44:17 +03:00
parent 3ab17a3b29
commit b8c71872da

View File

@ -189,9 +189,9 @@ except ImportError:
def _make_key(args, kwds, typed,
kwd_mark = (object(),),
fasttypes = {int, str, frozenset, type(None)},
fasttypes = set((int, str, frozenset, type(None))),
sorted=sorted, tuple=tuple, type=type, len=len):
'Make a cache key from optionally typed positional and keyword arguments'
"""Make a cache key from optionally typed positional and keyword arguments"""
key = args
if kwds:
sorted_items = sorted(kwds.items())