

def _possibly_promote(self, other):
    from pandas.tseries.index import DatetimeIndex
    if ((self.inferred_type == 'date') and isinstance(other, DatetimeIndex)):
        return (DatetimeIndex(self), other)
    elif (self.inferred_type == 'boolean'):
        if (not is_object_dtype(self.dtype)):
            return (self.astype('object'), other.astype('object'))
    return (self, other)

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index._possibly_promote/original