AlkantarClanX12

Your IP : 3.143.235.104


Current Path : /usr/lib64/python2.7/Tools/scripts/
Upload File :
Current File : //usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyo

�
�fc@sGdZddlZddlZddd��YZd�Zdd d��YZd�Zd	d!d
��YZd�Zdd"d
��YZ	d�Z
dd#d��YZd�Zd�Z
id�Zd�ZdZxreed�eed�eed�eed�eed�eed�eed�deGHedZq�WdS($sAFind the maximum recursion limit that prevents interpreter termination.

This script finds the maximum safe recursion limit on a particular
platform.  If you need to change the recursion limit on your system,
this script will tell you a safe upper bound.  To use the new limit,
call sys.setrecursionlimit().

This module implements several ways to create infinite recursion in
Python.  Different implementations end up pushing different numbers of
C stack frames, depending on how many calls through Python's abstract
C API occur.

After each round of tests, it prints a message:
"Limit of NNNN is fine".

The highest printed value of "NNNN" is therefore the highest potentially
safe limit for your system (which depends on the OS, architecture, but also
the compilation flags). Please note that it is practically impossible to
test all possible recursion paths in the interpreter, so the results of
this test should not be trusted blindly -- although they give a good hint
of which values are reasonable.

NOTE: When the C stack space allocated by your system is exceeded due
to excessive recursion, exact behaviour depends on the platform, although
the interpreter will always fail in a likely brutal way: either a
segmentation fault, a MemoryError, or just a silent abort.

NB: A program that does not use __methods__ can set a higher limit.
i����NtRecursiveBlowup1cBseZd�ZRS(cCs|j�dS(N(t__init__(tself((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyR$s(t__name__t
__module__R(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyR#scCst�S(N(R(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyt	test_init'stRecursiveBlowup2cBseZd�ZRS(cCs
t|�S(N(trepr(R((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyt__repr__+s(RRR(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyR*scCs
tt��S(N(RR(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyt	test_repr.stRecursiveBlowup4cBseZd�ZRS(cCs||S(N((Rtx((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyt__add__2s(RRR(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyR
1scCst�t�S(N(R
(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyttest_add5stRecursiveBlowup5cBseZd�ZRS(cCs
t||�S(N(tgetattr(Rtattr((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyt__getattr__9s(RRR(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyR8scCs
t�jS(N(RR(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyttest_getattr<stRecursiveBlowup6cBseZd�ZRS(cCs||d||dS(Nii((Rtitem((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyt__getitem__@s(RRR(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyR?scCst�dS(Ni(R(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyttest_getitemCscCst�S(N(ttest_recurse(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyRFscCs�yddl}Wntk
r)dGHdSXd}xvtj�D]h}y||}w=Wn1tk
r�x!td�D]}|g}qqWnX|j|dd�|||<q=WdS(Ni����scannot import cPickle, skipped!idtprotocol(tcPickletImportErrortNonet	itertoolstcounttKeyErrortrangetdumps(t_cacheRtltnti((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyttest_cpickleIs


cCshtj|�|jd�r(|dGHn|GHt�|}y|�Wnttfk
r^nXdGHdS(Nttest_isYikes!(tsystsetrecursionlimitt
startswithtglobalstRuntimeErrortAttributeError(R#ttest_func_namet	test_func((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pytcheck_limitZs

i�RR
R	RRRR%sLimit of %d is fineid((((((t__doc__R'RRRRR	R
R
RRRRRR%R/tlimit(((s9/usr/lib64/python2.7/Tools/scripts/find_recursionlimit.pyt<module>s4