We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de9b536 commit dcd8f52Copy full SHA for dcd8f52
tests/basics/builtin_range.py
@@ -34,6 +34,12 @@
34
print(range(1, 4)[:-1])
35
print(range(7, -2, -4)[:])
36
37
+# zero step
38
+try:
39
+ range(1, 2, 0)
40
+except ValueError:
41
+ print("ValueError")
42
+
43
# bad unary op
44
try:
45
-range(1)
tests/basics/for_range.py
@@ -6,6 +6,13 @@
6
for x in range(1, *(6, 2)):
7
print(x)
8
9
10
11
+ for x in range(1, 2, 0):
12
+ pass
13
14
+ print('ValueError')
15
16
# apply args using **
17
18
for x in range(**{'end':1}):
0 commit comments