title: Is it bad practice to modify attributes of one module from another module?
body: <p>I want to define a bunch of config variables that can be imported in all the modules in my project. The values of those variables will be constant during runtime but are not known before runtime; they depend on the input. Usually I'd define a <em>dict</em> in my top module which would be passed to all functions and classes from other modules; however, I was thinking it may be cleaner to simply create a blank <em>config.py</em> module which would be dynamically filled with config variables by the top module:</p>
  <pre><code># top.py
  import config
  config.x = x
  
  # config.py
  x = None
  
  # other.py
  import config
  print(config.x)
  </code></pre>
  <p>I like this approach because I don't have to save the parameters as attributes of classes in my other modules; which makes sense to me because parameters do not describe classes themselves.</p>
  <p>This works but is it considered bad practice?</p>