MCPcopy Index your code
hub / github.com/RustPython/RustPython / multislice

Function multislice

Lib/test/test_buffer.py:372–376  ·  view source on GitHub ↗

Multi-dimensional slicing: slices is a list of slice objects.

(lst, slices)

Source from the content-addressed store, hash-verified

370 return [len(lst[slices[0]])] + slice_shape(lst[0], slices[1:])
371
372def multislice(lst, slices):
373 """Multi-dimensional slicing: slices is a list of slice objects."""
374 if atomp(lst):
375 return lst
376 return [multislice(sublst, slices[1:]) for sublst in lst[slices[0]]]
377
378def m_assign(llst, rlst, lslices, rslices):
379 """Multi-dimensional slice assignment: llst and rlst are the operands,

Calls 1

atompFunction · 0.85

Tested by

no test coverage detected