def remove(self, item):
"""
This is as list.remove but works with id.
data = '<a><b></b><b></b></a>'
html = Html()
dom = html.feed(data)
for root, ind in dom.sail_with_root():
if ind.name == 'b':
root.remove(ind)
print dom
It should print.
<a ></a>
"""
index = self.index(item)
del self[index]
评论列表
文章目录