diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-04-04 22:55:58 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-04-04 22:55:58 (GMT) |
commit | bc0e9108261693b6278687f4fb4709ff76c2e543 (patch) | |
tree | afef5d4734034ed0268950cf06321aefd4154ff3 /Lib/mutex.py | |
parent | 2f486b7fa6451b790b154e6e4751239d69d46952 (diff) | |
download | cpython-bc0e9108261693b6278687f4fb4709ff76c2e543.zip cpython-bc0e9108261693b6278687f4fb4709ff76c2e543.tar.gz cpython-bc0e9108261693b6278687f4fb4709ff76c2e543.tar.bz2 |
Convert a pile of obvious "yes/no" functions to return bool.
Diffstat (limited to 'Lib/mutex.py')
-rw-r--r-- | Lib/mutex.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/mutex.py b/Lib/mutex.py index 2348a2e..47d2ca2 100644 --- a/Lib/mutex.py +++ b/Lib/mutex.py @@ -24,12 +24,12 @@ class mutex: def testandset(self): """Atomic test-and-set -- grab the lock if it is not set, - return true if it succeeded.""" + return True if it succeeded.""" if not self.locked: self.locked = 1 - return 1 + return True else: - return 0 + return False def lock(self, function, argument): """Lock a mutex, call the function with supplied argument |