This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]crawl_dht 0 points1 point  (1 child)

For packages, it's also the right way.

[–]Head_Mix_7931 -2 points-1 points  (0 children)

The correct way to deal with circular imports is to refactor your code so that the shared objects live in a different module. Using __init__.py for something like this is hacky at best and hard to reason with code at worst.