On 08 janvier 13:13, Martin Pool wrote:
> Hi,

Hi Martin,
 
> Following on from my patch to fix an incorrect warning for \0, this one
> adds a new warning for octal character escapes in a string.  A typical
> problematic example is:
> 
>   re.sub('\w+,\w+', '\1 \2', a)
> 
> and a bit more motivation is that
> pep-3127<http://www.python.org/dev/peps/pep-3127/> deprecates
> the 0-prefixed syntax for integers (not for character escapes.)
> 
> Of course this is more of a warning about something that might be
> unintentional, and people might reasonably choose to use them, for
> something like '\033' (escape).  But, it's easy to turn it off or rephrase
> that as '\x1b'.

I tend to agree, though may be it deserves a separated warning so it
may be disabled globally. May be some other people on the list have an opinion 
on this ?

Cheers
-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to