def update(self, new: '<STR_LIT>', flags: Flags):
items = [i for i in self.items if i.flags != flags]<EOL>items.extend(new.items)<EOL>self.items = items<EOL>
Erase items with the specified flags and insert the new items from
the other sentence instead.