Replace an existing child (by matching the href). Guarantees not to change the order of items[]

def replaceItem(self, child, href):
        """Replace an existing child (by matching the href). Guarantees not to change the order of items[]"""
        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