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 elazar
Recipients elazar
Date 2013-10-12.16:41:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There's no dedicated StackOverflowErrorException, So there is no way to accurately distinguish a recursion overflow from a general RuntimeError. 

One cannot use the exception message, since the docs explicitly says that "Exception messages are not part of the Python API", and checking for

    len(traceback.extract_tb(trace)) >= sys.getrecursionlimit()-1

is ugly, and (AFAIK) not guaranteed to be correct.

Use case: I've found this while trying to create a cycle detector that will compress the traceback of such errors.

See discussion in python-ideas:

An cycle-detection implementation:
Date User Action Args
2013-10-12 16:41:47elazarsetrecipients: + elazar
2013-10-12 16:41:47elazarsetmessageid: <>
2013-10-12 16:41:47elazarlinkissue19235 messages
2013-10-12 16:41:47elazarcreate