def is_file_like(v):
    """
    Return True if this object is file-like or is a tuple in a format
    that the requests library would accept for uploading.
    """
    # see http://docs.python-requests.org/en/latest/user/quickstart/#more-complicated-post-requests
    return hasattr(v, 'read') or (
        isinstance(v, tuple) and 2 >= len(v) and hasattr(v[1], 'read'))
dataset/ETHPy150Open ckan/ckanapi/ckanapi/common.py/is_file_like/swapped operands of `>=`