This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sgmllib.SGMLParser.reset() problem
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cpgray, gaul, loewis
Priority: normal Keywords:

Created on 2003-03-25 15:55 by cpgray, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Messages (3)
msg15260 - (view) Author: Chris Gray (cpgray) Date: 2003-03-25 15:55
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.
msg15261 - (view) Author: Andrew Gaul (gaul) Date: 2003-08-23 00:35
Logged In: YES 
user_id=139865

See patch 793559 for a fix.
msg15262 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-09-20 10:59
Logged In: YES 
user_id=21627

Fixed with said patch for 2.3.1 and 2.4.
History
Date User Action Args
2022-04-10 16:07:53adminsetgithub: 38213
2003-03-25 15:55:37cpgraycreate