title: eval evaluates to a tuple
body: <p>I have three indexes, <code>x,y,t</code> and a tridimensional matrix (it's actually a netcdf variable) in python but the order in which the indexes have to be applied to the matrix change. So, to make it easily user-definable I am trying to get the specific element I want as</p>
  
  <pre><code>order='t,x,y'  # or 't,y,x' or anything like this
  elem=matrix[eval(order)]
  </code></pre>
  
  <p>but this fails with <code>TypeError: illegal subscript type</code>. When I try</p>
  
  <pre><code>a=eval(order)
  print type(a)
  </code></pre>
  
  <p>it gives me that <code>a</code> is a tuple, so I'm guessing this is the source of my problem. But why is <code>a</code> a tuple? Any ideas as how to do this? Documentation wasn't helpful.</p>
  
  <p>Also, somehow doing</p>
  
  <pre><code>a=eval(order)
  i,j,k=a
  elem=matrix[i,j,k]
  </code></pre>
  
  <p>doesn't work either. Not sure as to why.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>People are misunderstanding what I'm trying to do here apparently, so let me explain a little better. This is inside a function where the values <code>x</code>, <code>y</code>, <code>t</code> are already defined. However, the order in which to apply those indexes should be provided by the user. So the call would be something like <code>func(order='t,x,y')</code>. That's at least the only way I figured the user could pass the <em>order</em> of the indexes as a parameter. Sorry for the confusion.</p>