O'Reilly logo
  • Sri Harsha V thinks this is interesting:

The notion of importing is also completely general throughout Python. Any file can import tools from any other file. For instance, the file a.py may import b.py to call its function, but b.py might also import c.py to leverage different tools defined there. Import chains can go as deep as you like: in this example, the module a can import b, which can import c, which can import b again, and so on.


Cover of Learning Python, 5th Edition


This para indicated one more thing. There could be circular imports. And python framework, I guess, should be able to take care of this because once it sees that a particular module has been loaded it won't load it again and so a walk along the circular references doesn't end up with endless circular traversal. WELL, THAT'S MY GUESS.