title: Using eval in defing Python class data attributs
body: <p>I wonder if it possible to use eval to creates class data attributes. Something like following code:</p>
  
  <pre><code>class Test:
      def __init(self):
          matrix_names = ['F', 'B', 'H', 'Q', 'R', 'x', 'P']
          for matrix in matrix_names:
              print matrix
              operation = "self.%s = self.__matrix_read(%s)" %\
               (matrix, matrix)
              eval(operation)
  
      def __matrix_read(self, filename):
          return (read(".matrix/%s.csv"%filename))
  </code></pre>
  
  <p>In iPython I get:</p>
  
  <pre><code>File "&lt;string&gt;", line 1
     self.F = self.__matrix_read(F)
         ^
  SyntaxError: invalid syntax
  </code></pre>