diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-07-01 01:25:23 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-07-01 01:25:45 +0300 |
commit | 58b7b01cb539cb23109faadaf373e0134b81a6da (patch) | |
tree | 859b271ec3f5a667026e2586a9a0c181bf33e5a7 /tests/extmod/ure_split.py | |
parent | 871a45dd0c96097601b4cf819aded020150a098c (diff) | |
download | micropython-58b7b01cb539cb23109faadaf373e0134b81a6da.tar.gz micropython-58b7b01cb539cb23109faadaf373e0134b81a6da.zip |
extmod/modure: If input string is bytes, return bytes results too.
This applies to match.group() and split().
For ARM Thumb2, this increased code size by 12 bytes.
Diffstat (limited to 'tests/extmod/ure_split.py')
-rw-r--r-- | tests/extmod/ure_split.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/extmod/ure_split.py b/tests/extmod/ure_split.py index 317ca98927..a8b9c1686c 100644 --- a/tests/extmod/ure_split.py +++ b/tests/extmod/ure_split.py @@ -26,3 +26,8 @@ print(s) r = re.compile("[a-f]+") s = r.split("0a3b9") print(s) + +# bytes objects +r = re.compile(b"x") +s = r.split(b"fooxbar") +print(s) |