Brett Cannon added the comment:

The key thing to think about is do you think find_spec("parent.module") is 
working with a single thing called "parent.module" or is it working with two 
separate things of "parent" and "module" which happens to be contained on 
"parent"? If you take the former view then you get the current semantics, but 
if you view it as the latter then you get the semantics you're suggesting, 
tkhyn.

My inclination is for the former semantics (i.e. think of it as a really long 
name for a specific module where it turns out the name is broken). If you look 
at it as find_spec(".submodule", package="parent") this also visually supports 
the idea that parent modules shouldn't trigger a None return. Finally, this 
would break any code that expects the current semantics.

So thanks for the bug report, but I'm going to close this as "not a bug".

----------
nosy: +brett.cannon, eric.snow, ncoghlan
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

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

Reply via email to