MCPcopy Index your code
hub / github.com/dask/dask / ishashable

Function ishashable

dask/core.py:18–37  ·  view source on GitHub ↗

Is x hashable? Examples -------- >>> ishashable(1) True >>> ishashable([1]) False See Also -------- iskey

(x)

Source from the content-addressed store, hash-verified

16
17
18def ishashable(x):
19 """Is x hashable?
20
21 Examples
22 --------
23
24 >>> ishashable(1)
25 True
26 >>> ishashable([1])
27 False
28
29 See Also
30 --------
31 iskey
32 """
33 try:
34 hash(x)
35 return True
36 except TypeError:
37 return False
38
39
40def istask(x):

Callers 5

to_graphvizFunction · 0.90
_to_cytoscape_jsonFunction · 0.90
inlineFunction · 0.90
cloneMethod · 0.90
test_ishashableFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_ishashableFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…