I had exactly the same problem yesterday when i was trying to insert a Tag. I don't think it's worth worrying about - might as well just use what works and pass a simple HTML string to insert/replaceWith. Tag objects don't seem to work the way BeautifulSoup's documentation says they do.
|