On Sat, Feb 3, 2018, at 11:25, Gregory P. Smith wrote: > On Wed, Jan 31, 2018 at 4:46 PM Jesus Cea <j...@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.
While I agree about .locked's present publicness, use of locked predicates in concurrent programs is usually serious code smell. So, the documentation should come with a warning note. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com