Different behaviour of regexp in 3.6.0b2

Chris Angelico rosuav at gmail.com
Fri Oct 14 13:26:55 EDT 2016


On Sat, Oct 15, 2016 at 4:12 AM, Ned Batchelder <ned at nedbatchelder.com> wrote:
> There doesn't seem to be a change to string literals at all. It's only a
> change in the regex engine.
>
>     Python 3.6.0b2 (default, Oct 10 2016, 21:30:05)
>     [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
>     Type "help", "copyright", "credits" or "license" for more information.
>     >>> "\s"
>     '\\s'

Try with -Wall. To avoid breaking every novice Windows program ever
written (bar two or three), it's only a warning for now.

ChrisA



More information about the Python-list mailing list