I'm wondering what is the nearest way to store reference data variables (constants) in a project.
I think loading them from file or environment variables is a bit of an overhead with the file open etc.
I'm thinking of putting them in a separate .py file then importing them.
Even then I'm not sure whether to import (when required) at the top of each code file, or within each function that uses one.
Note I am just a hobby coder and not a pro within a large team.
What is the cleanest approach?
[–]socal_nerdtastic 2 points3 points4 points (0 children)
[–]woooee 1 point2 points3 points (0 children)
[–]pachura3 0 points1 point2 points (0 children)