/python_circular_import

Ways to avoid python circle import error

Primary LanguagePythonMIT LicenseMIT

如何避免Python的循环导入问题

本repo整理了“避免Python的循环导入问题”的几种方法,支持Python 2 和Python 3

这些方法适用于Python中调用package的情况,可以执行python test.py查看几种方法的执行结果。

注:

本repo中的demo参考了这个Gist


How to avoid python circle import error?

This repo collects a few ways to avoid "circle import error" in python, supports both Python 2 and Python 3.

They work when using python packages, you can run python test.py to check out result.

Reference: This Gist