[docs] Incorrect documentation in threading.Lock?
Julien Palard
julien at palard.fr
Fri Feb 22 09:40:12 EST 2019
Hi Koskinen, thanks for asking!
> Shouldn't the second paragraph's second sentence start with "If a call with blocking set to *False* would block..."?
It would cover an unexisting case: calling with blocking set to *False* won't block anyway, so "if blocking is false would block" is the impossible case, only calls with blocking=True can block.
The idea of those tangled sentences is to state that when the function is called with blocking=False and the lock is already held, the function returns *False*.
Instead of writing "and the lock is already held" the documentation write the equivalent: if the call would have blocked if called with blocking=True ("If a call with blocking set to True would block" in the doc).
Bests,
--
Julien Palard
https://mdk.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20190222/8cb785ca/attachment.html>
More information about the docs
mailing list