From 465a604547e1438e650c8b4142816e2330363767 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 20 Feb 2017 17:22:12 +1100 Subject: [PATCH] tests/cpydiff: Add a test for storing iterable to a list slice. --- tests/cpydiff/types_list_store_noniter.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/cpydiff/types_list_store_noniter.py diff --git a/tests/cpydiff/types_list_store_noniter.py b/tests/cpydiff/types_list_store_noniter.py new file mode 100644 index 0000000000..1d69b4a823 --- /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()`` on RHS to convert the iterable to a list +""" +l = [10, 20] +l[0:1] = range(4) +print(l)