
report at bugs
Jul 17, 2009, 5:27 PM
Post #1 of 6
(387 views)
Permalink
|
|
[issue6509] re.py - <compiled byte-object regular expr> encounter unexpected str-object
|
|
New submission from kai zhu <kaizhu256 [at] gmail>: >>> import re >>> compiled = re.compile(b"a(\w)") >>> s = b"aa" >>> s = compiled.sub(b"a\\1", s) Traceback (most recent call last): File "<stdin>", line 1, in <module> File ".../lib/python3.1/re.py", line 303, in filter return sre_parse.expand_template(template, match) File ".../lib/python3.1/sre_parse.py", line 810, in expand_template return sep.join(literals) TypeError: sequence item 0: expected bytes, str found ---------- components: Library (Lib) messages: 90650 nosy: kaizhu severity: normal status: open title: re.py - <compiled byte-object regular expr> encounter unexpected str-object type: behavior versions: Python 3.1 _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue6509> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|