I have a common utils named submodules
, which is shared across different target (dataset, for example). So, I have to define some target specific attributes, like function and variables.
I have try to do something like this
utils.py
But def setup(name):
if ...:
var = val
import module
elif ...:
do something
is prohibited within function.
Is there any good practice or any elegant way to do this?