SGMLParser questions

Jeremy Fincher tweedgeezer at hotmail.com
Thu Apr 24 04:53:55 EDT 2003


martin at v.loewis.de (Martin v. Löwis) wrote in message news:<m3n0ihdb80.fsf at mira.informatik.hu-berlin.de>...
> > 3. handle_starttag() turn tags into lower case. This work perfectly
> > for HTML. But can it works case sensitively?
> 
> No.
> 
> To get these features, you could subclass SGMLParser. However, you
> probably have to copy a lot of code into your subclass.

It seems it'd be easy enough to add a "case sensitive" keyword
argument to __init__ and sprinkle a few if statements before the
.lower()s on strings.  Would such a patch be accepted?

Jeremy




More information about the Python-list mailing list