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