This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sergey.Kirpichev
Recipients Sergey.Kirpichev
Date 2016-10-04.09:00:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475571639.5.0.779232953767.issue28354@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-10-04 09:00:39Sergey.Kirpichevsetrecipients: + Sergey.Kirpichev
2016-10-04 09:00:39Sergey.Kirpichevsetmessageid: <1475571639.5.0.779232953767.issue28354@psf.upfronthosting.co.za>
2016-10-04 09:00:39Sergey.Kirpichevlinkissue28354 messages
2016-10-04 09:00:38Sergey.Kirpichevcreate