Brett Cannon added the comment:

Referring to the other issue was more about tying the two issues together than 
necessarily expecting the other patch to work.

As for supporting packages as well as submodules, I'm not sure. It seems a 
little odd not to support the idea, but then again if something is built-in 
then there really isn't a need to support the concept of a directory containing 
more modules. But then again since there is a difference in terms of how a 
module vs package looks it should probably be supported.

And if you do try and support it, there might be nothing more needed than to 
have the module be named pkg.__init__ and have some special handling to strip 
out the '__init__' part of the name and to set `__path__ = []` in importlib. 
Then importlib can simply try for `name` and `name.__init__` and then use that 
to figure out if the module should be considered a package or not.

This whole issue is unfortunately one of those things where it's uncommon 
enough to have to think about all edge cases and the overall impact on other 
users if the suggested changes are made and to not have a clear-cut answer.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26646>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to