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