diff options
author | Patrick <pnpnpn@users.noreply.github.com> | 2017-11-06 21:39:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 21:39:04 -0500 |
commit | 3ad0308d30c4904b9ea272da326c0c3795161378 (patch) | |
tree | 6741cf9f731f3dcb1d4e2df98b58c8a56de7c40d | |
parent | dfefe8321dbf39d216cb2a76a191405d7afa88d8 (diff) | |
parent | 14d8ddbaaf199b16d6fe82a7e593c66aae2a59e8 (diff) | |
download | timeout-decorator-3ad0308d30c4904b9ea272da326c0c3795161378.tar.gz |
Merge pull request #40 from boynedmaster/patch-1
Update README to be updated with Python 3
-rw-r--r-- | README.rst | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -28,10 +28,10 @@ Usage @timeout_decorator.timeout(5) def mytest(): - print "Start" + print("Start") for i in range(1,10): time.sleep(1) - print "%d seconds have passed" % i + print("{} seconds have passed".format(i)) if __name__ == '__main__': mytest() @@ -45,10 +45,10 @@ Specify an alternate exception to raise on timeout: @timeout_decorator.timeout(5, timeout_exception=StopIteration) def mytest(): - print "Start" + print("Start") for i in range(1,10): time.sleep(1) - print "%d seconds have passed" % i + print("{} seconds have passed".format(i)) if __name__ == '__main__': mytest() @@ -73,7 +73,7 @@ case - by using multiprocessing. To use it, just pass print "Start" for i in range(1,10): time.sleep(1) - print "%d seconds have passed" % i + print("{} seconds have passed".format(i)) if __name__ == '__main__': mytest() |