test for absence of infinite loop

Chris Angelico rosuav at gmail.com
Tue Jul 17 05:32:17 EDT 2018


On Tue, Jul 17, 2018 at 7:10 PM, Robin Becker <robin at reportlab.com> wrote:
> A user reported an infinite loop in reportlab. I determined a possible cause
> and fix and would like to test for absence of the loop. Is there any way to
> check for presence/absence of an infinite loop in python? I imagine we could
> do something like call an external process and see if it takes too long, but
> that seems a bit flaky.

All you gotta do is solve the halting problem...

https://en.wikipedia.org/wiki/Halting_problem

ChrisA


More information about the Python-list mailing list