code: def replaceItem(self, child, href):
          
          assert isinstance(child, Base), "child item must be a hypercat Catalogue or Resource"
          for i in range(len(self.items)):
              if(self.items[i].href == href):
                  self.items[i] = child   # Replace existing
                  return
          assert False, "No such child item to replace as "+href
docs: Replace an existing child (by matching the href). Guarantees not to change the order of items[]