Nick Coghlan <ncogh...@gmail.com> added the comment:

I forget we had mod_spec.parent available to us these days, so yes, we should 
use that rather than recalculating the parent with str.rpartition.

As Mario noted, we only want to change the behaviour when the executed module 
is a plain module or submodule, rather than being a package in its own right 
with a pkg.__main__ submodule (since the current behaviour is correct in the 
latter case).

----------

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

Reply via email to