diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-30 03:39:14 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-30 03:39:14 (GMT) |
commit | 46ac8eb3c899b498299a2f8fbcdd4ed3f32addba (patch) | |
tree | bcbe8646fceabec7bcdc4c365f6389fb537fdb68 /Lib/threading.py | |
parent | 78e057a32a92c3bfb464b27a02f4931c474769e8 (diff) | |
download | cpython-46ac8eb3c899b498299a2f8fbcdd4ed3f32addba.zip cpython-46ac8eb3c899b498299a2f8fbcdd4ed3f32addba.tar.gz cpython-46ac8eb3c899b498299a2f8fbcdd4ed3f32addba.tar.bz2 |
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 491a7c0..0af193b 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() |