diff options
| author | Damien George <damien.p.george@gmail.com> | 2017-02-20 17:22:12 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2017-02-20 17:22:12 +1100 |
| commit | 465a604547e1438e650c8b4142816e2330363767 (patch) | |
| tree | 05445e1f0fac512b6888cff8a78cc8cb58ed2f90 | |
| parent | 3218ccd70d8f387662987f6c1beb79102288b13d (diff) | |
tests/cpydiff: Add a test for storing iterable to a list slice.
| -rw-r--r-- | tests/cpydiff/types_list_store_noniter.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/cpydiff/types_list_store_noniter.py b/tests/cpydiff/types_list_store_noniter.py new file mode 100644 index 000000000..1d69b4a82 --- /dev/null +++ b/tests/cpydiff/types_list_store_noniter.py @@ -0,0 +1,9 @@ +""" +categories: Types,list +description: List slice-store with non-iterable on RHS is not implemented +cause: RHS is restricted to be a tuple or list +workaround: Use ``list(<iter>)`` on RHS to convert the iterable to a list +""" +l = [10, 20] +l[0:1] = range(4) +print(l) |
