MCPcopy Create free account
hub / github.com/dask/dask / itemgetter

Class itemgetter

dask/utils.py:1243–1258  ·  view source on GitHub ↗

Variant of operator.itemgetter that supports equality tests

Source from the content-addressed store, hash-verified

1241
1242
1243class itemgetter:
1244 """Variant of operator.itemgetter that supports equality tests"""
1245
1246 __slots__ = ("index",)
1247
1248 def __init__(self, index):
1249 self.index = index
1250
1251 def __call__(self, x):
1252 return x[self.index]
1253
1254 def __reduce__(self):
1255 return (itemgetter, (self.index,))
1256
1257 def __eq__(self, other):
1258 return type(self) is type(other) and self.index == other.index
1259
1260
1261class MethodCache:

Callers 6

_build_agg_args_simpleFunction · 0.90
_build_agg_args_listFunction · 0.90
test_itemgetterFunction · 0.90
plot_tasksFunction · 0.85
new_blockdimFunction · 0.85
_breakpointsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_itemgetterFunction · 0.72