Compare the structure of llst[lslices] and rlst[rslices].
(llst, rlst, lslices, rslices)
| 398 | return llst |
| 399 | |
| 400 | def cmp_structure(llst, rlst, lslices, rslices): |
| 401 | """Compare the structure of llst[lslices] and rlst[rslices].""" |
| 402 | lshape = slice_shape(llst, lslices) |
| 403 | rshape = slice_shape(rlst, rslices) |
| 404 | if (len(lshape) != len(rshape)): |
| 405 | return -1 |
| 406 | for i in range(len(lshape)): |
| 407 | if lshape[i] != rshape[i]: |
| 408 | return -1 |
| 409 | if lshape[i] == 0: |
| 410 | return 0 |
| 411 | return 0 |
| 412 | |
| 413 | def multislice_assign(llst, rlst, lslices, rslices): |
| 414 | """Return llst after assigning: llst[lslices] = rlst[rslices]""" |
no test coverage detected