Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment:
In a regex, putting a backslash before any character that's not an ASCII-range letter or digit makes it a literal. re.escape doesn't special-case control characters. Its purpose is to make a string that might contain metacharacters into one that's a literal, and it already does that, although it sometimes escapes more than necessary. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42668> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com