class documentation
class _CompatIO(object):
Stream that lazy-allocates its buffer based on the first write's type
This is a wrapper around BytesIO/StringIO that will allocate the respective internal buffer based on whether the first write is bytes or not. It is intended to be used with PycURL, which returns the response as bytes in Python 3 and string in Python 2.