[Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

Brett Cannon brett at python.org
Wed Jul 17 15:35:59 CEST 2013


On Tue, Jul 16, 2013 at 9:07 PM, Barry Warsaw <barry at python.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Jul 16, 2013, at 07:34 PM, Tres Seaver wrote:
>
> >On 07/16/2013 07:09 AM, Nick Coghlan wrote:
> >
> >> I did find it interesting that we *don't* explicitly advise against
> >> the use of "import *" for anything other than optional accelerator
> >> modules or republishing internal interfaces through a public API,
> >> even though we advice against the practice in the tutorial. Perhaps
> >> another oversight worth correcting?
> >
> >+1.  'from foo import *' (from any source other than another module in
> >the same package) is a code stench far worse than anything else PEP8
> >proscribes.
>
> Maybe we should disable it for anything that isn't at the interactive
> prompt
> <0.5 wink>.
>

Or how about dropping the whole ``from ... import ...`` format entirely?
<0.5 wink; seriously, it's implementation is a pain and it has wonky
semantics>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130717/4612d998/attachment.html>


More information about the Python-Dev mailing list