def replaceItem(self, child, href):
assert isinstance(child, Base), "<STR_LIT>"<EOL>for i in range(len(self.items)):<EOL><INDENT>if(self.items[i].href == href):<EOL><INDENT>self.items[i] = child   <EOL>return<EOL><DEDENT><DEDENT>assert False, "<STR_LIT>"+href<EOL>
Replace an existing child (by matching the href). Guarantees not to change the order of items[]