Email [Python-projects] Pylint complaining of string module prevents use of variables like string.printable

subject
[Python-projects] Pylint complaining of string module prevents use of variables like string.printable
date
2005/10/26 16:47
Hi all,

Here's a little annoying problem in pylint, an otherwise very nice and useful
tool.

Pylint (all recent versions including 0.8) complains about the import of the
string module with W0402 warning, stating that it is obsolete.

Although  the intent is to get people to use the string object, there are
variables declared in the string module that are not available anywhere else
(like string.printable).  Pylint should not generate warning when those
variables are used.  This problem was reported back in august 2004 (see
http://lists.logilab.org/pipermail/python-projects/2004-August/000131.html).

Another problem is that pylint generates the same warning if the code imports a
module whose name starts with "string".   For example, if the tested module
imports a module called "stringfile" (which is not a standard module and is not
obsolete), pylint still complains with [W0402] Uses of a deprecated module
'stringfile'.

Thanks

Pierre Rouleau


_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects