summaryrefslogtreecommitdiff
path: root/Lib/mutex.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-30 03:39:14 +0000
committerRaymond Hettinger <python@rcn.com>2002-06-30 03:39:14 +0000
commit137fff598982fa0591db444f6c6ea6525535825c (patch)
tree5050743c008e2ebb503b6fad799c8010db8a17ea /Lib/mutex.py
parent15c0183cfa154d41d63051e8cd419ad5d860eff6 (diff)
downloadcpython-137fff598982fa0591db444f6c6ea6525535825c.tar.gz
Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i)
Diffstat (limited to 'Lib/mutex.py')
-rw-r--r--Lib/mutex.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/mutex.py b/Lib/mutex.py
index 47d2ca2371..e15710a908 100644
--- a/Lib/mutex.py
+++ b/Lib/mutex.py
@@ -44,8 +44,7 @@ class mutex:
"""Unlock a mutex. If the queue is not empty, call the next
function with its argument."""
if self.queue:
- function, argument = self.queue[0]
- del self.queue[0]
+ function, argument = self.queue.pop(0)
function(argument)
else:
self.locked = 0