Hi, On 05 novembre 22:49, Amaury Forgeot d'Arc wrote: > 2009/11/5 James Lingard <[email protected]>: > > A bug I have encountered several times in Python code is writing: > > > > assert( x, "x should have been True" ) > > > > rather than: > > > > assert x, "x should have been True" > > > > It would be great if pylint could catch this error. > > note that python2.6 already emits a warning: > > >>> def f(x): > ... assert( x, "x should have been True" ) > ... > <stdin>:2: SyntaxWarning: assertion is always true, perhaps remove > parentheses?
see http://www.logilab.org/ticket/18860 -- Sylvain Thénault LOGILAB, Paris (France) 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 [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
