[Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

Nick Coghlan ncoghlan at gmail.com
Wed Feb 25 00:01:14 CET 2015


On 25 Feb 2015 01:07, "Stephen J. Turnbull" <stephen at xemacs.org> wrote:
>
> Chris Angelico writes:
>
>  > I don't mind how long the deprecation period is, as long as there can
>  > be an option to Python that makes a noisy warning.
>
> If that's OK with you and for the use case you explicitly described,
> though, a .bat file that runs a linter first might be the better
> option since (a) you don't have to wait and (b) you can put any
> bugaboo you like in there and (c) it can warn about syntacticly
> correct strings that "just fail" and may be hard to find.

The linter developers don't have a decision making process that lets them
pursue things like this on their own.

By contrast, if we went with a deprecation warning (and potentially a
command line option) then the linter developers can backport the already
defined check comparatively easily.

Regards,
Nick.

>
> I think the Zen is right on, here:
>
>     Now is better than never.
>     Although never is often better than *right* now.
>
> I don't have a good sense for which it is, though, partly because (a)
> I don't program on Windows, but more importantly, (b) many of the
> dangerous strings actually used won't generate warnings or errors ever.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150225/4281bef5/attachment-0001.html>


More information about the Python-Dev mailing list