is this primes generator pythonic
Is the following code for generating primes pythonic?

    def get_primes(n):
        primes=[True]*(n+1)
        next_p=(i for i,j in enumerate(primes) if j)
        primes[0:2]=False,False
        while True:
            p=next(next_p)
            yield p
            primes[p::p]=[False]*(n//p)

Note that next(next_p) will eventually throw a StopIteration error which somehow ends the function get_primes. Is that bad?

Also note that next_p is a generator which iterates over primes, however primes changes during iteration. Is that bad style?
is this primes generator pythonic
===

Is the following code for generating primes pythonic?

    def get_primes(n):
        primes=[True]*(n+1)
        next_p=(i for i,j in enumerate(primes) if j)
        primes[0:2]=False,False
        while True:
            p=next(next_p)
            yield p
            primes[p::p]=[False]*(n//p)

Note that next(next_p) will eventually throw a StopIteration error which somehow ends the function get_primes. Is that bad?

Also note that next_p is a generator which iterates over primes, however primes changes during iteration. Is that bad style?