File: six_shim.py

package info (click to toggle)
python-bleach 6.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,356 kB
  • sloc: python: 14,626; sh: 61; makefile: 51
file content (19 lines) | stat: -rw-r--r-- 305 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
Replacement module for what html5lib uses six for.
"""

import http.client
import operator
import urllib


PY3 = True
binary_type = bytes
string_types = (str,)
text_type = str
unichr = chr
viewkeys = operator.methodcaller("keys")

http_client = http.client
urllib = urllib
urllib_parse = urllib.parse