[Python-bugs-list] [ python-Bugs-709491 ] sgmllib.SGMLParser.reset() problem

SourceForge.net noreply at sourceforge.net
Sat Sep 20 06:59:56 EDT 2003


Bugs item #709491, was opened at 2003-03-25 16:55
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=709491&group_id=5470

Category: Python Library
Group: Python 2.2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Chris Gray (cpgray)
Assigned to: Nobody/Anonymous (nobody)
Summary: sgmllib.SGMLParser.reset() problem

Initial Comment:
sgmllib.SGMLParser.reset() doesn't reset

__starttag_text to None



Here's an IDLE session illustrating the problem using

the subclass htmllib.HTMLParser:



Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit

(Intel)] on win32

Type "copyright", "credits" or "license" for more

information.

IDLE 0.8 -- press F1 for help

>>> import formatter

>>> import htmllib

>>> class HTMLP(htmllib.HTMLParser):

	def __init__(self):

		htmllib.HTMLParser.__init__(self,

formatter.NullFormatter())



>>> p = HTMLP()

>>> print p.get_starttag_text()

None

>>> p.feed('<html>')

>>> print p.get_starttag_text()

<html>

>>> p.reset()

>>> print p.get_starttag_text()

<html>



The value for this last call to get_starttag_text()

should be None.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-09-20 12:59

Message:
Logged In: YES 
user_id=21627

Fixed with said patch for 2.3.1 and 2.4.

----------------------------------------------------------------------

Comment By: Andrew Gaul (gaul)
Date: 2003-08-23 02:35

Message:
Logged In: YES 
user_id=139865

See patch 793559 for a fix.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=709491&group_id=5470



More information about the Python-bugs-list mailing list