]> granicus.if.org Git - python/commitdiff
Add a comment about unreachable code, and fix a typo
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 18 Oct 2009 18:37:11 +0000 (18:37 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 18 Oct 2009 18:37:11 +0000 (18:37 +0000)
Lib/test/test_threading.py

index 5f4b0261bfa95cfa31ed39b75a79b1b3c312b29a..ba60d8a495b3901f8a9e23e292d7cb5366e1e2cd 100644 (file)
@@ -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