[Python-checkins] cpython: Improve variable names

raymond.hettinger python-checkins at python.org
Mon Mar 11 04:34:50 CET 2013


http://hg.python.org/cpython/rev/79943dee0aca
changeset:   82594:79943dee0aca
parent:      82592:0f86b51f8f8b
user:        Raymond Hettinger <python at rcn.com>
date:        Sun Mar 10 20:34:16 2013 -0700
summary:
  Improve variable names

files:
  Lib/threading.py |  10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/Lib/threading.py b/Lib/threading.py
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -222,14 +222,14 @@
     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
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list