In Python3, does `import` work transitively?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In Python3, does import work transitively? For example, if a module contains import A , and the module for A contains import B , then does the module import B indirectly? Compared to other languages: In Java, some said that import doesn't work transitively, see https://stackoverflow.com/a/46677664 . in C, include does work transitively. For example, if a file contains #include "A.h" , and A.h contains #include "B.h" , then the file also includes B.h indirectly. How do Python's import , Java's import, and C's include` work under the hook to