summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/list-index.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/float/list-index.py')
-rw-r--r--tests/float/list-index.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/float/list-index.py b/tests/float/list-index.py
new file mode 100644
index 0000000000..13e4557af7
--- /dev/null
+++ b/tests/float/list-index.py
@@ -0,0 +1,8 @@
+x = [1, 2]
+
+print(x[1])
+
+try:
+ print(x[1.0])
+except TypeError:
+ print("TypeError")