You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Absolute imports are recommended, as they are usually more readable and tend to be better behaved (or at least give better error messages) if the import system is incorrectly configured (such as when a directory inside a package ends up on sys.path):
from . import elections, strategies, methods
Though there are a lot of other packages that do it this way.
I've always been confused about the best way to do this stuff.
The text was updated successfully, but these errors were encountered:
Currently the overall package structure is what I want:
As is the methods sub-package:
But the other two include cruft that shouldn't be exposed to the user, such as
np
andcdist
, andelections
includes itself:Also the
__init__.py
files have relative imports, despite this being mildly recommended against by PEP8:Though there are a lot of other packages that do it this way.
I've always been confused about the best way to do this stuff.
The text was updated successfully, but these errors were encountered: