From 58b7b01cb539cb23109faadaf373e0134b81a6da Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 1 Jul 2017 01:25:23 +0300 Subject: 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. --- tests/extmod/ure_split.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/extmod/ure_split.py') diff --git a/tests/extmod/ure_split.py b/tests/extmod/ure_split.py index 317ca9892..a8b9c1686 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) -- cgit v1.2.3