diff Lib/threading.py @ 24058:37ffce2d9c3c legacy-trunk

Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i)
author Raymond Hettinger <python@rcn.com>
date Sun, 30 Jun 2002 03:39:14 +0000
parents e2f2187c3d2c
children e5a07cc81559
line wrap: on
line diff
--- a/Lib/threading.py	Sat Jun 29 16:06:47 2002 +0000
+++ b/Lib/threading.py	Sun Jun 30 03:39:14 2002 +0000
@@ -633,8 +633,7 @@
             while not self.queue:
                 self._note("get(): queue empty")
                 self.rc.wait()
-            item = self.queue[0]
-            del self.queue[0]
+            item = self.queue.pop(0)
             self._note("get(): got %s, %d left", item, len(self.queue))
             self.wc.notify()
             self.mon.release()