'Dictionary style __contains__ method.'

def __contains__(self, key):

    if (self.list is None):
        raise TypeError, 'not    indexable'
    return any(((item.name == key) for item in self.list))
