]> granicus.if.org Git - python/commitdiff
#14823: Simplify threading.Lock.acquire argument discussion.
authorR David Murray <rdmurray@bitdance.com>
Thu, 17 May 2012 13:15:02 +0000 (09:15 -0400)
committerR David Murray <rdmurray@bitdance.com>
Thu, 17 May 2012 13:15:02 +0000 (09:15 -0400)
Doc/library/threading.rst

index 89434b6efd8edf6e30bf04a758a66263a2c8397f..44e4d6dd05e54d38b504d7bf3559f529bec7d39c 100644 (file)
@@ -401,15 +401,12 @@ All methods are executed atomically.
 
    Acquire a lock, blocking or non-blocking.
 
-   When invoked without arguments, block until the lock is unlocked, then set it to
-   locked, and return true.
+   When invoked with the *blocking* argument set to ``True`` (the default),
+   block until the lock is unlocked, then set it to locked and return ``True``.
 
-   When invoked with the *blocking* argument set to true, do the same thing as when
-   called without arguments, and return true.
-
-   When invoked with the *blocking* argument set to false, do not block.  If a call
-   without an argument would block, return false immediately; otherwise, do the
-   same thing as when called without arguments, and return true.
+   When invoked with the *blocking* argument set to ``False``, do not block.
+   If a call with *blocking* set to ``True`` would block, return ``False``
+   immediately; otherwise, set the lock to locked and return ``True``.
 
 
 .. method:: Lock.release()