Does this method of importing modules in Python call a loop?

app / __ init __. py

from blah import test

app / x.py

from app import *

test()

Basically, I have a file __init__.pythat contains a bunch of imports that will be used throughout the application. I put them all here to save me from having to import them into each file (each file in this folder will use the same import)

I am wondering if this line from app import *causes its import, since it is inside the folder app...

Am I doing it right?

+3
source share
1 answer

, , __init__.py. , , , , , .

+4

Source: https://habr.com/ru/post/1784350/


All Articles