commit | 40a088dc27865eb1236d6c728d2880ecd0022a65 | [log] [tgz] |
---|---|---|
author | Thomas Wouters <thomas@python.org> | Tue Mar 18 20:19:54 2008 +0000 |
committer | Thomas Wouters <thomas@python.org> | Tue Mar 18 20:19:54 2008 +0000 |
tree | 9489856463cd6b00e2f40ec200a2d640704d8b50 | |
parent | e8c3d266c8cea759a0eb1c17b9c5f989f87bb135 [diff] [blame] |
Fix 're' to work on bytes. It could do with a few more tests, though.
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index f3b415d..4f62416 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py
@@ -472,7 +472,7 @@ code[skip] = len(code) - skip def isstring(obj): - return isinstance(obj, str) + return isinstance(obj, (str, bytes)) def _code(p, flags):