Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
26534cec
Commit
26534cec
authored
Jan 03, 2014
by
Paul Sokolovsky
Browse files
Add test for byte string slicing.
parent
decad08e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/basics/tests/slice-bstr1.py
0 → 100644
View file @
26534cec
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
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment