A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-June/004551.html below:

[Python-Dev] Package Style Guide

[Python-Dev] Package Style Guide [Python-Dev] Package Style GuideGreg Stein gstein@lyra.org
Thu, 8 Jun 2000 04:43:24 -0700
On Thu, Jun 08, 2000 at 11:35:14AM +0200, Peter Funk wrote:
>...
> > Is this style evil?  If so, why? 
> 
> I believe it will get really hard to come up with a 'namespace style guide' 
> which everybody can aggree on.  But who cares: let's start a rant:
> 
> -->  IMO 'from ... import ...' is EVIL and its use should be banned!  <--

You are being overly strict here. I use this all the time:

from module import submodule
...
submodule.Class()

or even

from module.submodule import subsub
...
subsub.Blargle()

In other words, "from package import module" is a Fine Thing. It can
simplify your code without hiding where the symbols come from.

In general, I agree with you: importing symbols from a module into your
namespace is a Bad Thing.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4