On 3/20/07, Pierre GM <[EMAIL PROTECTED]> wrote:
On Tuesday 20 March 2007 15:29:01 Charles R Harris wrote: > but I want > to suggest that we run pychecker, and maybe pylint, over the python code to > look for errors. I'm using Pydev w/ Eclipse that supports pylint. I usually don't have any warning from pylint about numpy. Could you be more specific ? ___
For instance, make a file warn.py containing the line: from numpy import * Then [EMAIL PROTECTED] scratch]$ pychecker warn among the warning returned are ... /usr/lib/python2.4/site-packages/numpy/lib/type_check.py:30: Local variable (typecodes) shadows global defined on line 0 in file <unknown> ... /usr/lib/python2.4/site-packages/numpy/lib/utils.py:287: (object) shadows builtin 34 errors suppressed, use -#/--limit to increase the number of errors displayed Neither is an error, but it is bad style to shadow builtins and unexpected errors can result. The second warning refers to this bit of code: def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'): """Get help information for a function, class, or module. Example: >>> from numpy import * >>> info(polyval) # doctest: +SKIP polyval(p, x) Evaluate the polymnomial p at x. Description: If p is of length N, this function returns the value: p[0]*(x**N-1) + p[1]*(x**N-2) + ... + p[N-2]*x + p[N-1] """ global _namedict, _dictlist import pydoc if hasattr(object,'_ppimport_importer') or \ hasattr(object, '_ppimport_module'): object = object._ppimport_module elif hasattr(object, '_ppimport_attr'): object = object._ppimport_attr Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion