title: New Class doesn't have a setItem Method
body: <p>So, this is my code.</p>
  
  <pre><code>def classMaker(csv):
      csv = csv.split("/n")
      firstLine = csv[0]
      csv = csv[1:]
      class newClass():
          def __init__(self, line):
              self.vars = firstLine
              for i in range(len(line)):
                  self[firstLine[i]] = line[i]
      return [newClass(line) for line in csv]
  </code></pre>
  
  <p>The problem is an AttributeError in self[firstLine[i]] = line[i]. It says</p>
  
  <p><code>AttributeError: newClass instance has no attribute '__setitem__'</code></p>
  
  <p>I don't know why it is causing this error. My goal is to take in a csv file exported from Excel and auto-generate object names from field names.</p>
  
  <p>Thank you in advance.</p>