Skip to content

Commit 218a876

Browse files
committed
tests/basics/builtin_range: Add tests for negative slicing of range.
1 parent 03659c5 commit 218a876

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/basics/builtin_range.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
print(range(1, 4)[1:])
3434
print(range(1, 4)[:-1])
3535
print(range(7, -2, -4)[:])
36+
print(range(1, 100, 5)[5:15:3])
37+
print(range(1, 100, 5)[15:5:-3])
38+
print(range(100, 1, -5)[5:15:3])
39+
print(range(100, 1, -5)[15:5:-3])
3640

3741
# zero step
3842
try:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy