sgmllib parser keeps old tag data?

andrew cooke andrew at acooke.org
Fri Feb 13 10:54:45 EST 2009


Sorry, this reply was delayed (trying to use usenet...) and so now seems
(even more) bad tempered than needed.  Andrew

andrew cooke wrote:
> you are declaring class variables, not instance variables.  you need to
> declare these in an __init__ method.  RTFM.
> http://docs.python.org/tutorial/classes.html#a-first-look-at-classes
> 
> Berend van Berkum wrote:
>> class MyParser(sgmllib.SGMLParser):
>> 
>> content = ''
>> markup = []
>> span_stack = []
> 
> 
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list