Xiang Zhang added the comment:

I can get the expected behaviour with the lastest 2.7 build.

Python 2.7.13+ (2.7:0d4e0a736688, Jan 15 2017, 00:51:57) 
[GCC 5.2.1 20151010] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from HTMLParser import HTMLParser
>>> class MyHTMLParser(HTMLParser):
...     def handle_starttag(self, tag, attrs):
...         print 'Encountered a start tag: %s' % tag
... 
>>> parser = MyHTMLParser()
>>> parser.feed('<a href="http://somesite.com/large_image.jpg";><img 
>>> src="http://somesite.com/small_image.jpg"; width="800px" /></a>')
Encountered a start tag: a
Encountered a start tag: img

----------
nosy: +xiang.zhang

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29276>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to