def is_binary_string(obj):
    if PY2:
        # Python 2
        return isinstance(obj, str)
    else:
        # Python 3
        return isinstance(obj, bytes)
Return True if `obj` is a binary string, False if it is anything else
dataset/ETHPy150Open winpython/winpython/winpython/py3compat.py/is_binary_string