Ask Your Question
1

Why does Circular Importing only function properly in one of my Python scripts but not the other?

asked 2021-10-31 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-08-17 14:00:00 +0000

nofretete gravatar image

Circular importing is generally considered bad practice in Python as it can cause errors and inconsistencies in the code. The behavior of circular importing can vary depending on the specific code and dependencies of each script. It is possible that one script's dependencies are structured in a way that allows circular importing to function properly, while the other script's dependencies do not. It is recommended to avoid circular importing whenever possible and instead refactor the code to eliminate the dependency loop.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-10-31 11:00:00 +0000

Seen: 11 times

Last updated: Aug 17 '22