[issue27364] Deprecate invalid unicode escape sequences

Emanuel Barry report at bugs.python.org
Sun Aug 14 17:16:57 EDT 2016


Emanuel Barry added the comment:

Here's a new pair of patches for this. There are some small tweaks to the tests, and I properly fixed all instances of invalid escapes (I also made some strings into raw-strings at some places where it's not needed, solely for consistency with surrounding lines or functions). The patch that fixes the invalid escapes is four times larger than the previous one.

I would also advise to add to PEP 8 a bit recommending that strings used in regular expressions alwaus be raw-strings, even if there's no need to, as a lot (at least 70%) of the invalid escapes fixed were used in regexes.

----------
Added file: http://bugs.python.org/file44107/invalid_stdlib_escapes_2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27364>
_______________________________________


More information about the Python-bugs-list mailing list