(args, kwds, typed,
              kwd_mark=(object(),),
              fasttypes=set([int, str, frozenset, type(None)]))
return _HashedSeq(key)
Make a cache key from optionally typed positional and keyword arguments
Make a cache key from optionally typed positional and keyword arguments
Make a cache key from optionally typed positional and keyword arguments
def _make_key(args, kwds, typed,
              kwd_mark=(object(),),
              fasttypes=set([int, str, frozenset, type(None)])):
    """Make a cache key from optionally typed positional and keyword arguments"""
    key = args
    if kwds:
        sorted_items = sorted(kwds.items())
        key += kwd_mark
        for item in sorted_items:
            key += item
    if typed:
        key += tuple(type(v) for v in args)
        if kwds:
            key += tuple(type(v) for k, v in sorted_items)
    elif len(key) == 1 and type(key[0]) in fasttypes:
        return key[0]
    return _HashedSeq(key)
def _make_key ( args , kwds , typed , kwd_mark = ( object ( ) , ) , fasttypes = set ( [ int , str , frozenset , type ( None ) ] ) ) : key = args if kwds : sorted_items = sorted ( kwds . items ( ) ) key += kwd_mark for item in sorted_items : key += item if typed : key += tuple ( type ( v ) for v in args ) if kwds : key += tuple ( type ( v ) for k , v in sorted_items ) elif len ( key ) == 1 and type ( key [ 0 ] ) in fasttypes : return key [ 0 ] return _HashedSeq ( key )