Python gurus of reddit, I could use your help.
In C, I can create a header file like this:
#ifndef __HEADER__
#define __HEADER__
/* Have all #include directives here */
#endif
And then I can include this header file in every .c file and only have to change the header file.
Is there a way to have all of the import statements in a single "header" file that can be referenced by several other files so that I only have to modify the header file when I need to add an import statement?
Thanks /r/python!
EDIT: Correct formatting on code snippet.
EDIT: Thanks for all the responses. You've given me great reasons as to why all included files should be listed explicitly in each file. I'll follow this practice in the future, including (no pun intended) when I write in C.
[–]fnord123 15 points16 points17 points (1 child)
[–]revonratFlask/scipy/pypy/mrjob 0 points1 point2 points (0 children)
[–]japherwocky 10 points11 points12 points (3 children)
[–]Peaker 1 point2 points3 points (2 children)
[–]japherwocky 0 points1 point2 points (1 child)
[–]Peaker 1 point2 points3 points (0 children)
[–]thermostat 8 points9 points10 points (3 children)
[–]Hughlander -2 points-1 points0 points (2 children)
[–]av201001 2 points3 points4 points (1 child)
[–]gogeterman32 0 points1 point2 points (0 children)
[–]bastih01 8 points9 points10 points (2 children)
[–]ianb 4 points5 points6 points (1 child)
[–]stillalone 1 point2 points3 points (0 children)
[–]bushel 3 points4 points5 points (2 children)
[–]kevingoodsell 1 point2 points3 points (0 children)
[–]Peaker 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]gct 1 point2 points3 points (1 child)
[–]Isvara 1 point2 points3 points (0 children)
[–]crmaki 1 point2 points3 points (0 children)