Skip to content
Myr

compat.py

This file

Path

tests/compat.py

21 lines · 333 bytes · Python

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 8546a15 point at it.

The library raises NoneType error when file-pointer (fp) resolves to None.Rajiv Mayanibefore adoption8546a15

lines 1–21why, one step back
1# -*- coding: utf-8 -*-
23from requests.compat import is_py3456try:7 import StringIO8except ImportError:9 import io as StringIO1011try:12 from cStringIO import StringIO as cStringIO13except ImportError:14 cStringIO = None1516if is_py3:17 def u(s):18 return s19else:20 def u(s):21 return s.decode('unicode-escape')