Pavol Lisy added the comment: Maybe I am wrong but don't we get another weird behavior?
import sys.path # this is error now ModuleNotFoundError: No module named 'sys.path'; 'sys' is not a package So we probably expect same behavior here: import sys.path as foo But if we just replace LOAD_ATTR with IMPORT_FROM in the compiler then wouldn't it works like: from sys import path as foo ? ---------- nosy: +Pavol Lisy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30024> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com