8 from StringIO
import StringIO
, BytesIO
10 from io
import StringIO
, BytesIO
13 if sys
.version
[0] == "2":
14 from HTMLParser
import HTMLParser
16 from html
.parser
import HTMLParser
17 unescape
= HTMLParser().unescape
18 # According to https://github.com/python/cpython/blob/master/Lib/html/parser.py#L547 ,
19 # in python 3.5 maybe I should use
20 # from html import unescape
21 # but it is a far-future story:)
23 # raw_input and map function behaviour
24 if sys
.version
[0] == "2":
25 lmap
= lambda f
, a
: map(f
, a
)
28 lmap
= lambda f
, a
: list(map(f
, a
))