QUERY · ISSUE
BUG: sys.modules['__main__'] not pointing __import__('__main__')
proposed-closeneeds-info
cpython automatically gives access to sys.modules[__name__] from module '__main__' and returns value of __import__('__main__').
micropython does not and forces to use__import__(__name__) which is not a good way to get a module by fully qualified name ( eg when getting a dot package name you only get toplevel ).
CANDIDATE · ISSUE
BUG: sys.modules['sys'] not pointing __import__('sys')
Probably the same reason as :
https://github.com/micropython/micropython/issues/4427