Issue 681152: Tiny patch for bug 612074: sre unicode escapes (original) (raw)
Issue681152
Created on 2003-02-05 19:23 by glchapman, last changed 2022-04-10 16:06 by admin. This issue is now closed.
Messages (2) | ||
---|---|---|
msg42684 - (view) | Author: Greg Chapman (glchapman) | Date: 2003-02-05 19:23 |
Bug report 612074 points out that this raises an exception: import re a = unichr(0x2039) b = u"["+re.escape(a)+u"]" re.compile(b) The exception is raised by an unnecessary call to str in sre_parse.py (in the function _class_escape); str (u'\u2039') raises a UnicodeError. The call is unnecessary because (for example) u'1' == '1', so no type conversion is necessary to test for membership in OCTDIGITS. | ||
msg42685 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2003-04-19 08:40 |
Logged In: YES user_id=21627 Thanks for the patch. Committed as sre_parse.py 1.57 test_sre.py 1.40 sre_parse.py 1.51.6.1 test_sre.py 1.35.6.1 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-10 16:06:34 | admin | set | github: 37917 |
2003-02-05 19:23:54 | glchapman | create |