From 2aee92e68019c5a9b530ea008883eb23b062028f Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 9 Aug 2011 05:22:50 -0600 Subject: [PATCH] Update run_with_timeout docstring --- example-stringifier.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example-stringifier.py b/example-stringifier.py index d526f8f9..2eb54bdd 100644 --- a/example-stringifier.py +++ b/example-stringifier.py @@ -53,7 +53,8 @@ def run_with_timeout(code, time, globals=None): """ Evaluate ``code``, timing out after ``time`` seconds. - ``time`` must be an integer. The return value is whatever ``code`` returns. + In Python 2.5 and lower, ``time`` is rounded up to the nearest integer. + The return value is whatever ``code`` returns. """ # Set the signal handler and a ``time``-second alarm signal.signal(signal.SIGALRM, lambda s, f: timeout(s, f, time))