From: Robert Kern on
On 2009-10-29 16:52 PM, Aahz wrote:
> In article<mailman.2279.1256851983.2807.python-list(a)python.org>,
> Robert Kern<robert.kern(a)gmail.com> wrote:
>>
>> I like using pyflakes. It catches most of these kinds of typo errors, but is
>> much faster than pylint or pychecker.
>
> Coincidentally, I tried PyFlakes yesterday and was unimpressed with the
> way it doesn't work with "import *".

I consider "import *" the first error to be fixed, so it doesn't bother me much. :-)

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

From: exarkun on
On 09:52 pm, aahz(a)pythoncraft.com wrote:
>In article <mailman.2279.1256851983.2807.python-list(a)python.org>,
>Robert Kern <robert.kern(a)gmail.com> wrote:
>>
>>I like using pyflakes. It catches most of these kinds of typo errors,
>>but is
>>much faster than pylint or pychecker.
>
>Coincidentally, I tried PyFlakes yesterday and was unimpressed with the
>way it doesn't work with "import *".

Consider it (some very small, I'm sure) motivation to stop using "import
*", which is itself only something used in unimpressive software. ;)

Jean-Paul
From: Ben Finney on
aahz(a)pythoncraft.com (Aahz) writes:

> Coincidentally, I tried PyFlakes yesterday and was unimpressed with
> the way it doesn't work with "import *".

That's pretty much the reason to avoid 'from foo import *': it makes the
namespace indeterminate without actually running the code. Just as much
a problem for the human reader as for a reader like 'pyflakes'.

But you knew that already.

--
\ “Humanity has advanced, when it has advanced, not because it |
`\ has been sober, responsible, and cautious, but because it has |
_o__) been playful, rebellious, and immature.” —Tom Robbins |
Ben Finney
From: Albert Hopkins on
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)?



From: Ben Finney on
Albert Hopkins <marduk(a)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