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

Function insert

dask/utils.py:1158–1166  ·  view source on GitHub ↗

>>> insert(('a', 'b', 'c'), 0, 'x') ('x', 'b', 'c')

(tup, loc, val)

Source from the content-addressed store, hash-verified

1156
1157
1158def insert(tup, loc, val):
1159 """
1160
1161 >>> insert(('a', 'b', 'c'), 0, 'x')
1162 ('x', 'b', 'c')
1163 """
1164 L = list(tup)
1165 L[loc] = val
1166 return tuple(L)
1167
1168
1169def memory_repr(num):

Callers 2

groupby_tasksFunction · 0.90
_layerMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected