Commit 26534cec authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

Add test for byte string slicing.

parent decad08e
b"123"[0:1]
b"123"[0:2]
b"123"[:1]
b"123"[1:]
# Idiom for copying sequence
b"123"[:]
b"123"[:-1]
# Weird cases
b"123"[0:0]
b"123"[1:0]
b"123"[1:1]
b"123"[-1:-1]
b"123"[-3:]
b"123"[-3:3]
b"123"[0:]
b"123"[:0]
b"123"[:-3]
b"123"[:-4]
# No IndexError!
b""[1:1]
b""[-1:-1]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment