[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-21 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-21 Thread Mark Shannon
Mark Shannon added the comment: Yes, see PEP 651 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-19 Thread Xinmeng Xia
Xinmeng Xia added the comment: oh,I see. By the way, I set the argument of sys.setrecursionlimit to 10 in this program and a segmentation fault is reported. Is that normal? -- ___ Python tracker

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-19 Thread Mark Shannon
Mark Shannon added the comment: Try setting the recursion limit to 10 or so and it should terminate. The reason ctrl-C doesn't work is that you are catching the KeyboardInterrupt. Never use a plain `except:`, use `except Exception:` -- nosy: +Mark.Shannon

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Funny. But the output is not random. You can generate the sequence of letters by the following simple loop: s = '' for i in range(n): s = f'a{s}b{s}' The length of this sequence is 2*(2**n-1). Finally, your code will raise a non-silenced

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-17 Thread Xinmeng Xia
New submission from Xinmeng Xia : In issue 42500, recursive calls in "Try-except" are resolved. This PR has fixed the crashes of some programs, such as program 1. And the core dump error is replaced with RecursiveError. However, program 2 will not report a RecursiveError. The program will