Python: instancja nie ma atrybutu

Mam problem z listą w klasie w Pythonie. Oto mój kod:

class Residues:
    def setdata(self, name):
        self.name = name
        self.atoms = list()

a = atom
C = Residues()
C.atoms.append(a)

Coś takiego. Dostaję błąd mówiący:

AttributeError: Residues instance has no attribute 'atoms'

questionAnswers(1)

yourAnswerToTheQuestion