Different behaviour of regexp in 3.6.0b2
Ned Batchelder
ned at nedbatchelder.com
Fri Oct 14 13:48:10 EDT 2016
On Friday, October 14, 2016 at 1:27:09 PM UTC-4, Chris Angelico wrote:
> 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.
I see. I'm not sure how novice users will know to enable warnings that are
off by default. Do people regularly run their code with -Wall? I never have,
and I don't know how I would have seen these warnings.
--Ned.
More information about the Python-list
mailing list