diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-30 03:39:14 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-30 03:39:14 +0000 |
commit | 137fff598982fa0591db444f6c6ea6525535825c (patch) | |
tree | 5050743c008e2ebb503b6fad799c8010db8a17ea /Lib/threading.py | |
parent | 15c0183cfa154d41d63051e8cd419ad5d860eff6 (diff) | |
download | cpython-137fff598982fa0591db444f6c6ea6525535825c.tar.gz |
Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i)
Diffstat (limited to 'Lib/threading.py')
-rw-r--r-- | Lib/threading.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/threading.py b/Lib/threading.py index 491a7c0b09..0af193b8fa 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -633,8 +633,7 @@ def _test(): 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() |