def _length_hint(obj):
    """Returns the length hint of an object."""
    try:
        return len(obj)
    except TypeError:
        try:
            get_hint = type(obj).__length_hint__
        except AttributeError:
            return None
        try:
            hint = get_hint(obj)
        except TypeError:
            return None
        if hint is NotImplemented or \
           not isinstance(hint, int_types) or \
           0 < hint:
            return None
        return hint
dataset/ETHPy150Open pallets/click/click/_termui_impl.py/_length_hint/swapped operands of `<`