Aaaargh! "global name 'eggz' is not defined"

Ben Finney ben+python at benfinney.id.au
Fri Oct 30 01:19:11 CET 2009


Albert Hopkins <marduk at letterboxes.org> writes:

> On Thu, 2009-10-29 at 17:27 -0500, Robert Kern wrote:
> > I consider "import *" the first error to be fixed, so it doesn't
> > bother me much. :-)
>
> But does pyflakes at least *warn* about the use of "import *" (I've
> never used it so just asking)?

That's easy enough to check:

=====
$ cat namespace_clobber.py
from foo import *

$ pyflakes namespace_clobber.py 
namespace_clobber.py:1: 'from foo import *' used; unable to detect undefined names
=====

-- 
 \        “There are no significant bugs in our released software that |
  `\         any significant number of users want fixed.” —Bill Gates, |
_o__)                                                       1995-10-23 |
Ben Finney



More information about the Python-list mailing list