[Python-ideas] Make undefined escape sequences have SyntaxWarnings

Antoine Pitrou solipsis at pitrou.net
Wed Oct 10 22:18:39 CEST 2012


On Wed, 10 Oct 2012 23:04:25 +0300
Serhiy Storchaka <storchaka at gmail.com>
wrote:
> On 10.10.12 22:46, Antoine Pitrou wrote:
> > -1. This will make life more difficult with regular expressions (and
> > produce lots of spurious warnings in existing code).
> 
> Strings for regular expressions always should be raw. Now regular 
> expressions supports \u and \U escapes and no reason to use non-raw strings.

That's a style issue, not a language rule.

Regards

Antoine.




-- 
Software development and contracting: http://pro.pitrou.net





More information about the Python-ideas mailing list