Re: [Python-Dev] Allowing import star with namespaces

2011-04-26 Thread Brendan Moloney
Ethan Furman wrote: > The strongest reason for not doing this is that it pollutes the current > namespace, not that it obliterates the 'pkg' namespace. Sorry, I phrased that badly. When I said "obliterates the 'pkg' namespace" I was referring to dumping the 'pkg' namespace into the current name

Re: [Python-Dev] Allowing import star with namespaces

2011-04-26 Thread Ethan Furman
Brendan Moloney wrote: We all know that doing: --> from pkg import * is bad because it obliterates the 'pkg' namespace. The strongest reason for not doing this is that it pollutes the current namespace, not that it obliterates the 'pkg' namespace. So why not allow something like: --> imp

Re: [Python-Dev] Allowing import star with namespaces

2011-04-26 Thread Steven D'Aprano
Brendan Moloney wrote: We all know that doing: from pkg import * is bad because it obliterates the 'pkg' namespace. So why not allow something like: I don't quite know what you mean by obliterating the pkg namespace, but if my guess is correct, you're wrong. One of the problems with impor

[Python-Dev] Allowing import star with namespaces

2011-04-26 Thread Brendan Moloney
We all know that doing: > from pkg import * is bad because it obliterates the 'pkg' namespace. So why not allow something like: > import pkg.* This would still be helpful for interactive sessions while keeping namespaces around. Sorry if this has been brought up before, my searching didn't f