Understanding python import



I think this is the best article that helps to import sub-directory as module,

https://timothybramlett.com/How_to_create_a_Python_Package_with___init__py.html

The only thing i wanted to say is, if you use

__all__ = ['mymodule1', 'mymodule2']

That's to accomodate syntax such as this

from sub-directory import *

See the magically asterisk there...... all this is for this little baby. :)





Comments

Popular posts from this blog

vllm : Failed to infer device type

android studio kotlin source is null error

gemini cli getting file not defined error