test_isinstance.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:pefile.pypy 作者: cloudtracer 项目源码 文件源码
def blowstack(fxn, arg, compare_to):
    # Make sure that calling isinstance with a deeply nested tuple for its
    # argument will raise RuntimeError eventually.
    tuple_arg = (compare_to,)


    if test_support.check_impl_detail(cpython=True):
        RECURSION_LIMIT = sys.getrecursionlimit()
    else:
        # on non-CPython implementations, the maximum
        # actual recursion limit might be higher, but
        # probably not higher than 99999
        #
        RECURSION_LIMIT = 99999

    for cnt in xrange(RECURSION_LIMIT+5):
        tuple_arg = (tuple_arg,)
        fxn(arg, tuple_arg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号