(self, a, b)
Generate all prime numbers in the range [a, b).

        Examples
        ========

        >>> from sympy import sieve
        >>> print([i for i in sieve.primerange(7, 18)])
        [7, 11, 13, 17]
Generate all prime numbers in the range [a, b).
Generate all prime numbers in the range [ a b ) .
def primerange(self, a, b):
        """Generate all prime numbers in the range [a, b).

        Examples
        ========

        >>> from sympy import sieve
        >>> print([i for i in sieve.primerange(7, 18)])
        [7, 11, 13, 17]
        """
        from sympy.functions.elementary.integers import ceiling

        # wrapping ceiling in int will raise an error if there was a problem
        # determining whether the expression was exactly an integer or not
        a = max(2, int(ceiling(a)))
        b = int(ceiling(b))
        if a >= b:
            return
        self.extend(b)
        i = self.search(a)[1]
        maxi = len(self._list) + 1
        while i < maxi:
            p = self._list[i - 1]
            if p < b:
                yield p
                i += 1
            else:
                return
def primerange ( self , a , b ) : from sympy . functions . elementary . integers import ceiling # wrapping ceiling in int will raise an error if there was a problem # determining whether the expression was exactly an integer or not a = max ( 2 , int ( ceiling ( a ) ) ) b = int ( ceiling ( b ) ) if a >= b : return self . extend ( b ) i = self . search ( a ) [ 1 ] maxi = len ( self . _list ) + 1 while i < maxi : p = self . _list [ i - 1 ] if p < b : yield p i += 1 else : return