diff Lib/Queue.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 c548e726b3bc
children 3eafbde56b21
line wrap: on
line diff
--- a/Lib/Queue.py	Sat Jun 29 16:06:47 2002 +0000
+++ b/Lib/Queue.py	Sun Jun 30 03:39:14 2002 +0000
@@ -146,6 +146,4 @@
 
     # Get an item from the queue
     def _get(self):
-        item = self.queue[0]
-        del self.queue[0]
-        return item
+        return self.queue.pop(0)