I might be completely wrong here, but I can't find a proper google source for the dilemma that I have:
Let's say we are using python, and we have files
foo.py and bar.py, which have the following pseudocode:
Code in foo.py:
# Code in foo.py
import sys
def foo():
# Some blah code for foo function
And code in bar.py is:
# Code in bar.py
import sys
import foo
def bar():
# Some blah code for bar function
Now, what I am wondering is : Will this not cause code bloat?
, since we have imported sys
twice in bar.py. Once via import sys
and another time because we are doing import foo
?
Additionally, what will be the correct thing to do when you have to include libraries in multiple files, which in turn will be included in other files?