[Tutor] Complaint about maximum recursion
amk at amk.ca
amk at amk.ca
Wed Oct 1 07:38:27 EDT 2003
On Wed, Oct 01, 2003 at 07:47:32AM +0200, Kristoffer Erlandsson wrote:
> greedy ones, or if you are sure you are just exceeding the limit by a
> small amount you can use sys.setrecursionlimit(n) to increase the limit.
No, this won't work. sys.setrecursionlimit() sets how deep Python code can
recurse. The recursion inside the regex engine is in C code, and it uses a
hard-wired limit (USE_RECURSION_LIMIT, set to 10000 on most platforms.
--amk
More information about the Tutor
mailing list