On Feb 20, 2008, at 5:59 AM, M.-A. Lemburg wrote:
-1. SGML is a much more general markup language than HTML.
Certainly. sgmllib doesn't handle the general case, and is unlikely to be reasonably extensible to support a substantial subset of SGML.
It's true that only htmllib does use sgmllib in the std lib, but there are applications out there that rely on sgmllib for the SGML part, e.g. ones implementing the DocBook tool chain.
I'd strongly encourage anyone who wants to use Python for general SGML parsing to either fork sgmllib (with a new name) and give it a real go, or integrate an existing SGML parser. Pretending that sgmllib is really a usable SGML parser doesn't seem like a good idea. It's also not widely enough used that it makes sense to have such a beast in the standard library.