I am developing a Python application; it has all its code in one package and, of course, passes inside it. The Python application package is not of interest to the user, it is just a GUI application.
The question is which style is preferable when importing modules inside the application package.
from application import settings, utils
or
from . import settings, utils
That is, I can either specify the name as it is (here is the "application"), or I can say "current package" using "."
This is a free software package, so there is a possibility that someone wants to plug in my application and change its name. In this case, alternative 1 is a little nuisance. However, I use style 1 all the time (although early code uses style 2 in some places) since style 1 looks a lot better.
Are there any arguments for my style (1) that I missed? Or is it stupid not to go with style 2?
source share