This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ThomasWaldmann2
Recipients ThomasWaldmann2, eryksun
Date 2021-03-31.12:44:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617194700.13.0.746001192045.issue43674@roundup.psfhosted.org>
In-reply-to
Content
Eryk, thanks much for your detailled and clear explaining!

Can confirm that using os.write makes it raise the RecursionError where I expected it to be. Also print() raising the RecursionError explains the behaviour I have seen.

Sadly, this also shows that handling RecursionError is not as easy as one would wish it to be, because the usual place for the exception handler is still too close to it triggering (again) and every other usually harmless call could also trigger it on that level.

So maybe a better solution is voluntarily stopping recursion at a safe distance from the recursion limit (== not going deeper, avoiding the exception).

Or doing some tricky construction of first going upwards to a safe distance from the limit when handling this exception.
History
Date User Action Args
2021-03-31 12:45:00ThomasWaldmann2setrecipients: + ThomasWaldmann2, eryksun
2021-03-31 12:45:00ThomasWaldmann2setmessageid: <1617194700.13.0.746001192045.issue43674@roundup.psfhosted.org>
2021-03-31 12:45:00ThomasWaldmann2linkissue43674 messages
2021-03-31 12:44:59ThomasWaldmann2create