How to determine what is imported via `from m import *`?
问题 I'm doing some patching of import statements, and I need to know exactly what members are imported by from m import * . The documentation seems to indicate that when __all__ is absent, all members will be imported that do not begin with an underscore. Is this exactly correct under all circumstances? I know that inspect.getmembers() , dir() , and m.__dict__ all have slightly different logic, so I'm not completely sure which (if any) will provide the same list as import * . 回答1: Let's take a