]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed for stricter argument matching rules
authorGuido van Rossum <guido@python.org>
Mon, 16 May 1994 09:26:24 +0000 (09:26 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 16 May 1994 09:26:24 +0000 (09:26 +0000)
Demo/threads/find.py

index 3bc54feba0adff6ee08dc6f72268f0eaed8f3706..940360abdff2dd73247714824018f60a9b69434b 100644 (file)
@@ -46,9 +46,8 @@ class WorkQ:
                self.work = []
                self.busy = 0
 
-       def addwork(self, job):
-               if not job:
-                       raise TypeError, 'cannot add null job'
+       def addwork(self, func, args):
+               job = (func, args)
                self.mutex.acquire()
                self.work.append(job)
                self.mutex.release()