Author serhiy.storchaka
Recipients pitrou, python-dev, r.david.murray, serhiy.storchaka, vstinner
Date 2015-10-01.20:27:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443731236.91.0.680334629351.issue25274@psf.upfronthosting.co.za>
In-reply-to
Content
_Py_MakeEndRecCheck() was changed in issue5392 (noised Antoine as a committer). There are many ways to make it monotonic.

#define _Py_MakeEndRecCheck(x) \
	(--(x) < ((_Py_CheckRecursionLimit > 200) \
		? (_Py_CheckRecursionLimit - 25) \
		: (3 * (_Py_CheckRecursionLimit >> 2))))

#define _Py_MakeEndRecCheck(x) \
	(--(x) < ((_Py_CheckRecursionLimit > 100) \
		? (_Py_CheckRecursionLimit - 50) \
		: (_Py_CheckRecursionLimit >> 1)))

Since the formula is so complex, it would be worth to extract common part from _Py_MakeEndRecCheck() and sys_setrecursionlimit(). Otherwise the code can become desynchronized.

The error message still looks confusing to me. May be short it to "limit is too low"? Noised David as grammar expert.

Why not have an hardcoded minimum limit? Current recursion depth and therefore minimal recursion limit are implementation defined and can depend on a way how the module is executed (run a script, import a module, run with runpy or IDLE, etc). May be interpret the limit relatively to current recursion depth?
History
Date User Action Args
2015-10-01 20:27:16serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, r.david.murray, python-dev
2015-10-01 20:27:16serhiy.storchakasetmessageid: <1443731236.91.0.680334629351.issue25274@psf.upfronthosting.co.za>
2015-10-01 20:27:16serhiy.storchakalinkissue25274 messages
2015-10-01 20:27:16serhiy.storchakacreate