def primerange(a, b):
 from sympy.functions.elementary.integers import ceiling
 if (a >= b):
  return
 if (b <= sieve._list[(-1)]):
  for i in sieve.primerange(a, b):
   (yield i)
  return
 a = (int(ceiling(a)) - 1)
 b = int(ceiling(b))
 while 1:
  a = nextprime(a)
  if (a < b):
   (yield a)
  else:
   return

def primerange ( a , b ) : from sympy . functions . elementary . integers import ceiling if ( a >= b ) : return if ( b <= sieve . _list [ ( - 1 ) ] ) : for i in sieve . primerange ( a , b ) : ( yield i ) return a = ( int ( ceiling ( a ) ) - 1 ) b = int ( ceiling ( b ) ) while 1 : a = nextprime ( a ) if ( a < b ) : ( yield a ) else : return
generate a list of all prime numbers in the range [a .