On Tue, Mar 20, 2007 at 08:48:46PM -0600, Charles R Harris wrote:
> 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 *
> 
<snip> 
> 
> 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:

If you go that way, it is bad style to import * in production code,
precisely because it can lead to identifier shadowing. You should try
import numpy as n

Remember the zen of Python:

Namespaces are one honking great idea -- let's do more of those!

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
Reprise et maintenance de sites CPS:     http://www.migration-cms.com/

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to