[Python-checkins] cpython (3.5): Issue #18916: Update thread module docstrings
berker.peksag
python-checkins at python.org
Mon May 2 05:25:59 EDT 2016
https://hg.python.org/cpython/rev/203c9c4ccb2a
changeset: 101207:203c9c4ccb2a
branch: 3.5
parent: 101205:84ff79cce41e
user: Berker Peksag <berker.peksag at gmail.com>
date: Mon May 02 12:25:35 2016 +0300
summary:
Issue #18916: Update thread module docstrings
* Fix acquire() signature
* Remove outdated help(LockType) reference
* Replace PyThread_allocate_lock() with threading.Lock()
Patch by Christopher Welborn.
files:
Modules/_threadmodule.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -159,7 +159,7 @@
}
PyDoc_STRVAR(acquire_doc,
-"acquire([wait]) -> bool\n\
+"acquire(blocking=True, timeout=-1) -> bool\n\
(acquire_lock() is an obsolete synonym)\n\
\n\
Lock the lock. Without argument, this blocks if the lock is already\n\
@@ -1134,7 +1134,8 @@
"allocate_lock() -> lock object\n\
(allocate() is an obsolete synonym)\n\
\n\
-Create a new lock object. See help(LockType) for information about locks.");
+Create a new lock object. See help(type(threading.Lock())) for\n\
+information about locks.");
static PyObject *
thread_get_ident(PyObject *self)
@@ -1326,7 +1327,7 @@
PyDoc_STRVAR(lock_doc,
"A lock object is a synchronization primitive. To create a lock,\n\
-call the PyThread_allocate_lock() function. Methods are:\n\
+call threading.Lock(). Methods are:\n\
\n\
acquire() -- lock the lock, possibly blocking until it can be obtained\n\
release() -- unlock of the lock\n\
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list