[Python-ideas] Allow 'import star' with namespaces
Paul Moore
p.f.moore at gmail.com
Sat May 7 00:04:43 CEST 2011
On 6 May 2011 21:52, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> He's saying that the package would be imported like normal. Then all
> "public" sub-modules of the package would automatically imported and bound
> to the namespace of the object that resulted from the import of the package.
There is no means of determining what submodules of a package exist.
Check PEP 302 for details - finders find modules ant they can do so
any way they like - there's nothing in the protocol to enumerate
subpackages, so you can't do it (if faced with a general PEP 302
finder).
Paul.
More information about the Python-ideas
mailing list