def __len__(self):
        if not self:
            return 0
        dif = self.stop - self.start
        if dif.is_infinite:
            raise ValueError(
                "Use .size to get the length of an infinite Range")
        return abs(dif//self.step)
dataset/ETHPy150Open sympy/sympy/sympy/sets/fancysets.py/Range.__len__/original