title: Python: Using a dummy class to pass variable names?
body: <p>This is a followup to <a href="https://stackoverflow.com/questions/9586305/python-function-that-returns-a-dict-whose-keys-are-the-names-of-the-input-argum/9586506#9586506">function that returns a dict whose keys are the names of the input arguments</a>, which I learned many things (paraphrased):</p>
  
  <ul>
  <li>Python objects, on the whole, don't know their names. </li>
  <li>No, this is not possible in general with <code>*args</code>. You'll have to use keyword arguments</li>
  <li>When the number of arguments is fixed, you can do this with <code>locals</code></li>
  <li>Using globals(). This will only work if the values are unique in the module scope, so it's fragile </li>
  <li>You're probably better off not doing this anyway and rethinking the problem.</li>
  </ul>
  
  <p>The first point highlighting my fundamental misunderstanding of Python variables. The responses were very pedagogic and nearly instantaneous, clearly this is both a well-understood yet easily confused topic.</p>
  
  <p>Since I'd like to learn how to do things proper, is it considered bad practice to create a dummy class to simply hold the variables with names attached to them?</p>
  
  <pre><code>class system: pass
  S = system ()
  S.T = 1.0
  S.N = 20
  S.L = 10
  
  print vars(S)
  </code></pre>
  
  <p>This accomplishes my original intent, but I'm left wondering if there is something I'm not considering that can bite me later.</p>