You could just:
import config
and have a global config module
excerpts from my comments:
You can always add special rules for odd situations by just saying oddValue if isOddSituation() else config.normalValue
.
If you want to have configuration modules be hierarchically subclassable (like my other answer describes), then you can represent a config as a class, or you can use the copy
module and make a shallow copy and modify it, or you can use a “config dictionary”, e.g.:
import config as baseConfig
config = dict(baseConfig, overriddenValue=etc)
It doesn’t really matter too much which scope you’re in.