]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improve variable names
authorRaymond Hettinger <python@rcn.com>
Mon, 11 Mar 2013 03:34:16 +0000 (20:34 -0700)
committerRaymond Hettinger <python@rcn.com>
Mon, 11 Mar 2013 03:34:16 +0000 (20:34 -0700)
Lib/threading.py

index 0261ee2706fc11b14dca2d118e6be7f560af5e02..415a993b0aa90a1760d67b010b62a70e3cef9c71 100644 (file)
@@ -222,14 +222,14 @@ class Condition:
     def notify(self, n=1):
         if not self._is_owned():
             raise RuntimeError("cannot notify on un-acquired lock")
-        __waiters = self._waiters
-        waiters = _deque(_islice(__waiters, n))
-        if not waiters:
+        all_waiters = self._waiters
+        waiters_to_notify = _deque(_islice(all_waiters, n))
+        if not waiters_to_notify:
             return
-        for waiter in waiters:
+        for waiter in waiters_to_notify:
             waiter.release()
             try:
-                __waiters.remove(waiter)
+                all_waiters.remove(waiter)
             except ValueError:
                 pass