summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-08-15 23:26:34 +1000
committerDamien George <damien.p.george@gmail.com>2016-08-15 23:26:34 +1000
commit095e43a9a5b3fc7c1220cdbabe6a4fed0973b1e1 (patch)
tree6a66ef9074eb268c006a784e1500f824f68d0f1c /tests
parentf6a8e84a2557c5edf29a6f3afa4d1cce1d42d389 (diff)
downloadmicropython-095e43a9a5b3fc7c1220cdbabe6a4fed0973b1e1.tar.gz
micropython-095e43a9a5b3fc7c1220cdbabe6a4fed0973b1e1.zip
py/sequence: Allow to use bignums as indices in slice objects.
See issue #2264.
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/slice_bignum.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/basics/slice_bignum.py b/tests/basics/slice_bignum.py
new file mode 100644
index 0000000000..cc820522b0
--- /dev/null
+++ b/tests/basics/slice_bignum.py
@@ -0,0 +1,5 @@
+# test slicing when arguments are bignums
+
+print(list(range(10))[(1<<66)>>65:])
+print(list(range(10))[:(1<<66)>>65])
+print(list(range(10))[::(1<<66)>>65])