0
How to circularly import module in a package
so i was just doing normal code and suddenly my program says something about circular import i have this on areo/base_loop.py ==== from .futures import Future ==== and this on areo/futures.py ==== from .base_loop import BaseLoop ==== how do i get around this so that i can import futures and base_loop simultaneously in each file and not get circular import error
7 Antworten
+ 1
oh also my __init__.py is
from .futures import *
from .base_loop import *
from .handlers import *
0
thanks but the solution doesn't seem to work do you want to see my code
0
Not really, the solution's there though.
You really should always post the code you have a question about, it'll help others see what the problem is.
0
okay then let me send it, because its on my laptop
0
these are the codes that import base_loop and themselves from base_loop