Re:Altering Python attribute handling for modules
by PurpleRamen on Monday September 11, 2023 @11:41AM
(#37468933)
That's an implementation-detail. Nothing prevents the import from diving automatically into the file. But doing so would open the door for name-shadowing, as with a package you could have a separate mp.py for import, or a definition of mp in __init__.py. And this would be another confusion for people, and a performance-problem maybe.
The "from" is what dives into a module and takes something out. It's not just defining a syntactic macro. You would have to do something closer to this:
to replace what "from" does.