New submission from Sergey B Kirpichev: We know from release notes, that "A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning". Sometimes it's true: $ python -W error Python 3.6.0b1+ (default, Oct 4 2016, 08:47:51) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> "xxx" != "hello \world" DeprecationWarning: invalid escape sequence '\w'
But shouldn't DeprecationWarning be in the following case as well? $ cat a.py def f(s): return s != "hello \world" $ cat b.py import a print(a.f("xxx")) $ python b.py True $ python -W error b.py True ---------- components: Interpreter Core messages: 278020 nosy: Sergey.Kirpichev priority: normal severity: normal status: open title: DeprecationWarning not reported for invalid escape sequences versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28354> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com