Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

        def multihash(x):
    try:
        return hash(x)
    except TypeError:
        if isinstance(x, (list, tuple, set, frozenset)):
            return hash(tuple(map(multihash, x)))
        if type(x) is dict:
            return hash(frozenset(map(multihash, x.items())))
        if type(x) is slice:
            return hash((x.start, x.stop, x.step))
        raise TypeError('Hashing not covered for ' + str(x))
        


src/l/o/logpy-HEAD/logpy/core.py   logpy(Download)
import itertools as it
from functools import partial
from .util import transitive_get as walk
from .util import deep_transitive_get as walkstar
from .util import (dicthash, interleave, take, evalt, index, multihash, unique)