@classmethod
    def _add_numeric_methods_binary(cls):

        def _make_evaluate_binop(op, opstr, reversed=False):
            def _evaluate_numeric_binop(self, other):

                from pandas.tseries.offsets import DateOffset
                other = self._validate_for_numeric_binop(other, op, opstr)

                # handle time-based others
                if isinstance(other, (DateOffset, np.timedelta64,
                                      Timedelta, datetime.timedelta)):
                    return self._evaluate_with_timedelta_like(other, op, opstr)
                elif isinstance(other, (Timestamp, np.datetime64)):
                    return self._evaluate_with_datetime_like(other, op, opstr)

                # if we are a reversed non-communative op
                values = self.values
                if reversed:
                    values, other = other, values

                attrs = self._get_attributes_dict()
                attrs = self._maybe_update_attributes(attrs)
                return Index(op(values, other), **attrs)

            return _evaluate_numeric_binop

        cls.__add__ = cls.__radd__ = _make_evaluate_binop(
            operator.add, '__add__')
        cls.__sub__ = _make_evaluate_binop(
            operator.sub, '__sub__')
        cls.__rsub__ = _make_evaluate_binop(
            operator.sub, '__sub__', reversed=True)
        cls.__mul__ = cls.__rmul__ = _make_evaluate_binop(
            operator.mul, '__mul__')
        cls.__pow__ = cls.__rpow__ = _make_evaluate_binop(
            operator.pow, '__pow__')
        cls.__mod__ = _make_evaluate_binop(
            operator.mod, '__mod__')
        cls.__floordiv__ = _make_evaluate_binop(
            operator.floordiv, '__floordiv__')
        cls.__rfloordiv__ = _make_evaluate_binop(
            operator.floordiv, '__floordiv__', reversed=True)
        cls.__truediv__ = _make_evaluate_binop(
            operator.truediv, '__truediv__')
        cls.__rtruediv__ = _make_evaluate_binop(
            operator.truediv, '__truediv__', reversed=True)
        if not compat.PY3:
            cls.__div__ = _make_evaluate_binop(
                operator.div, '__div__')
            cls.__rdiv__ = _make_evaluate_binop(
                operator.div, '__div__', reversed=True)
Bootstrapping
dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index._add_numeric_methods_binary--crossover with--dataset/ETHPy150Open mrgambal/vulyk/vulyk/control.py/project_init