mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 04:30:24 +01:00
objstr: Make *strip() accept bytes.
This commit is contained in:
@@ -10,3 +10,13 @@ print('www.example.com'.lstrip('cmowz.'))
|
||||
|
||||
print(' spacious '.rstrip())
|
||||
print('mississippi'.rstrip('ipz'))
|
||||
|
||||
print(b'mississippi'.rstrip(b'ipz'))
|
||||
try:
|
||||
print(b'mississippi'.rstrip('ipz'))
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
try:
|
||||
print('mississippi'.rstrip(b'ipz'))
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
|
||||
Reference in New Issue
Block a user