[pypy-issue] [issue1142] Maximum recursion depth exceeded VS Stack overflow

Senyai tracker at bugs.pypy.org
Tue May 15 16:59:44 CEST 2012


New submission from Senyai <senyai at gmail.com>:

# Hi! I just want to mention difference between CPython 2.7.2 and pypy-1.8
# CPython outputs 784799 MemoryError: Stack overflow
# and pypy 51691 RuntimeError: maximum recursion depth exceeded

from itertools import count, ifilter
def sieve():
    seq = count(2)
    while True:
        p = seq.next()
        seq = ifilter(p.__rmod__, seq)
        yield p

for n in sieve():
    print n

# Thx

----------
messages: 4313
nosy: pypy-issue, senyai
priority: bug
status: unread
title: Maximum recursion depth exceeded VS Stack overflow

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1142>
________________________________________


More information about the pypy-issue mailing list