0

What is the use of this method

sys.setrecursionlimit()

23rd Jun 2020, 6:30 PM
Indranil
Indranil - avatar
7 Answers
0
Have you learn anything about recursion?
23rd Jun 2020, 6:33 PM
ycsvenom
ycsvenom - avatar
0
Yeah
23rd Jun 2020, 6:33 PM
Indranil
Indranil - avatar
0
This method is for limiting the number of recurring I think the default limit is 999
23rd Jun 2020, 6:36 PM
ycsvenom
ycsvenom - avatar
0
Oo thanks bro ..😘
23rd Jun 2020, 6:37 PM
Indranil
Indranil - avatar
0
You are welcome
23rd Jun 2020, 6:41 PM
ycsvenom
ycsvenom - avatar
0
Where form you belongs?
23rd Jun 2020, 6:42 PM
Indranil
Indranil - avatar
0
Indranil see this This is from document sys.setrecursionlimit(limit)¶ Set the maximum depth of the Python interpreter stack to limit. This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python. The highest possible limit is platform-dependent. A user may need to set the limit higher when they have a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash. If the new limit is too low at the current recursion depth, a RecursionError exception is raised. Changed in version 3.5.1: A RecursionError exception is now raised if the new limit is too low at the current recursion depth.
23rd Jun 2020, 6:43 PM
ycsvenom
ycsvenom - avatar