On 06.05.2011 09:20, dag.odenhall@gmail.com wrote:
On 6 May 2011 00:24, Brendan Moloney <moloney@ohsu.edu> wrote:
Benjamin Peterson [benjamin@python.org] wrote:
import * is generally frowned upon, so encouraging its use by extending it is not a good idea.
Well it is frowned upon precisely because it pollutes the current namespace. This change would eliminate that issue.
I like this idea, except it's inconsistent with from-import-star, the latter which does *not* get you sub-packages or modules.
And that's for a reason: it's not easy (I think it's even impossible, because for example individual submodules can change __path__) to determine all importable submodules of a package. So ``import pkg.*`` would not have any behavior other than ``import pkg``. Georg