Skip to content

Commit 95b7110

Browse files
committed
#17091: update docstring for _thread.Lock.acquire.
The main docs were fixed to remove mention of None long ago, but the docstring was not. Reported by Armin Rigo, patch by Ian Cordasco.
1 parent db1ba4e commit 95b7110

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_threadmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ lock_PyThread_acquire_lock(lockobject *self, PyObject *args, PyObject *kwds)
138138
}
139139

140140
PyDoc_STRVAR(acquire_doc,
141-
"acquire([wait]) -> None or bool\n\
141+
"acquire([wait]) -> bool\n\
142142
(acquire_lock() is an obsolete synonym)\n\
143143
\n\
144144
Lock the lock. Without argument, this blocks if the lock is already\n\
145145
locked (even by the same thread), waiting for another thread to release\n\
146-
the lock, and return None once the lock is acquired.\n\
146+
the lock, and return True once the lock is acquired.\n\
147147
With an argument, this will only block if the argument is true,\n\
148148
and the return value reflects whether the lock is acquired.\n\
149149
The blocking operation is interruptible.");

0 commit comments

Comments
 (0)