From: Antoine Pitrou Date: Sun, 18 Oct 2009 18:37:11 +0000 (+0000) Subject: Add a comment about unreachable code, and fix a typo X-Git-Tag: v2.7a1~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=603acf99d04fc7149c3aa28202e56ee1f84f0c75;p=python Add a comment about unreachable code, and fix a typo --- diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 5f4b0261bf..ba60d8a495 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -176,11 +176,13 @@ class ThreadTests(unittest.TestCase): except AsyncExc: pass else: + # This code is unreachable but it reflects the intent. If we wanted + # to be smarter the above loop wouldn't be infinite. self.fail("AsyncExc not raised") try: self.assertEqual(result, 1) # one thread state modified except UnboundLocalError: - # The exception was raised to quickly for us to get the result. + # The exception was raised too quickly for us to get the result. pass # `worker_started` is set by the thread when it's inside a try/except