As my project grew big, I have multiple paths that I point all over the project, for example, paths and dictionary key names.
So currently I have
./file1.py
WIKI_TO_ML_DICT_PATH = '...'
CATEGORIES_KEY = 'categories'
...
...
./subdir/file2.py
WIKI_TO_ML_DICT_PATH = '...'
CATEGORIES_KEY = 'categories'
...
...
And I, of course, want them all to point to the same defines. What is the correct way to do that in terms of design and readability? Create a class with no functions in the root dir
and import it from all?
Thanks.
Aucun commentaire:
Enregistrer un commentaire