def remove(self, name): try: self.ab.people.pop(name) return True except KeyError: raise addressbook.PersonNotExistsError( "{} not exists".format(name))
def get(self, name): try: return self.ab.people[name] except KeyError: raise addressbook.PersonNotExistsError( "{} not exists".format(name))