Найти - Пользователи
Полная версия: Ошибка: maximum recursion depth exceeded in cmp
Начало » Python для новичков » Ошибка: maximum recursion depth exceeded in cmp
1
hter
Программа(функция) нормально работает при небольшом кол-ве значений, как подставляю нужные(большой объем данных). Рекурсия не бесконечна.
Он выдает ошибку: maximum recursion depth exceeded in cmp
Как ее отключить?
4kpt_II
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 she has 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.
hter
А можно чутка пояснить
hter
а все понял. спасибо.
JOHN_16
hter
я все же предположу что раз так - то алгоритм неудачный/ не правильный. Счаз под рукой нужной книги нет. но там была хорошее определение о некой “правильности” алгоритма на основании его свойств.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB