No, it wouldn't. It's a moot point because Python picks the package first, but
if it did pick modules before packages, then sys.modules['module'] would point
to the module from module.py and not module/__init__.py . "import module.part1"
first executes "import module", then looks in there to determine who to resolve
"module.part1". Since sys.modules['module'] is a regular module and not the
package, it wouldn't find module/part1.py .
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco