Skip to content

Commit 465a604

Browse files
committed
tests/cpydiff: Add a test for storing iterable to a list slice.
1 parent 3218ccd commit 465a604

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""
2+
categories: Types,list
3+
description: List slice-store with non-iterable on RHS is not implemented
4+
cause: RHS is restricted to be a tuple or list
5+
workaround: Use ``list(<iter>)`` on RHS to convert the iterable to a list
6+
"""
7+
l = [10, 20]
8+
l[0:1] = range(4)
9+
print(l)

0 commit comments

Comments
 (0)