six_shim.py 305 B

12345678910111213141516171819
  1. """
  2. Replacement module for what html5lib uses six for.
  3. """
  4. import http.client
  5. import operator
  6. import urllib
  7. PY3 = True
  8. binary_type = bytes
  9. string_types = (str,)
  10. text_type = str
  11. unichr = chr
  12. viewkeys = operator.methodcaller("keys")
  13. http_client = http.client
  14. urllib = urllib
  15. urllib_parse = urllib.parse