➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 vstinner
收信人 emptysquare, pitrou, serhiy.storchaka, vstinner, xdegaye
日期 2016-03-24.15:20:41
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1458832841.47.0.0123093646745.issue22898@psf.upfronthosting.co.za>
In-reply-to
内容
I tried the following script on Python 3.5 and Python 3.6 and I failed to reproduce the bug:
---
import sys, traceback

class MyException(Exception):
    def __init__(self, *args):
        1/0

def gen():
    f = open(__file__, mode='rb', buffering=0)
    yield

g = gen()
next(g)
recursionlimit = sys.getrecursionlimit()
sys.setrecursionlimit(len(traceback.extract_stack())+3)
try:
    g.throw(MyException)
finally:
    sys.setrecursionlimit(recursionlimit)
    print('Done.')
---

Note: I had to add "+3" to the sys.setrecursionlimit() call, otherwise the limit is too low and you get a RecursionError (it's a recent bugfix, issue #25274).

Can somone else please confirm that the bug is fixed?
历史
日期 用户 动作 参数
2016-03-24 15:20:41vstinner修改recipients: + vstinner, pitrou, xdegaye, serhiy.storchaka, emptysquare
2016-03-24 15:20:41vstinner修改messageid: <1458832841.47.0.0123093646745.issue22898@psf.upfronthosting.co.za>
2016-03-24 15:20:41vstinner链接issue22898 messages
2016-03-24 15:20:41vstinner创建