[Python-Dev] "threading.Lock().locked()" is not documented
Gregory P. Smith
greg at krypto.org
Sat Feb 3 14:25:38 EST 2018
On Wed, Jan 31, 2018 at 4:46 PM Jesus Cea <jcea at jcea.es> wrote:
> https://docs.python.org/3.6/library/threading.html doesn't document
> "threading.Lock().locked()", and it is something quite useful.
>
> In fact, it is used in "threading.py" itself. For instance, lines 109,
> 985, 1289.
>
> Is there any reason to not document it?.
>
No good reason. It is a public method and part of the public API
regardless of being documented or not. Always feel free to make a
documentation update PR.
The method does have a docstring.
https://github.com/python/cpython/blob/master/Modules/_threadmodule.c#L193
-gps
>
> (I didn't investigate other objects in the module).
>
> --
> Jesús Cea Avión _/_/ _/_/_/ _/_/_/
> jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
> Twitter: @jcea _/_/ _/_/ _/_/_/_/_/
> jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/ _/_/ _/_/
> "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
> "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
> "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/greg%40krypto.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180203/fd085e4b/attachment.html>
More information about the Python-Dev
mailing list