Message278020
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 |
|
Date |
User |
Action |
Args |
2016-10-04 09:00:39 | Sergey.Kirpichev | set | recipients:
+ Sergey.Kirpichev |
2016-10-04 09:00:39 | Sergey.Kirpichev | set | messageid: <1475571639.5.0.779232953767.issue28354@psf.upfronthosting.co.za> |
2016-10-04 09:00:39 | Sergey.Kirpichev | link | issue28354 messages |
2016-10-04 09:00:38 | Sergey.Kirpichev | create | |
|