title: Python: instance has no attribute
body: <p>I have a problem with list within a class in python. Here's my code :</p>
  
  <pre><code>class Residues:
      def setdata(self, name):
          self.name = name
          self.atoms = list()
  
  a = atom
  C = Residues()
  C.atoms.append(a)
  </code></pre>
  
  <p>Something like this. I get an error saying:</p>
  
  <pre><code>AttributeError: Residues instance has no attribute 'atoms'
  </code></pre>