[Python-Dev] "threading.Lock().locked()" is not documented
Benjamin Peterson
benjamin at python.org
Sat Feb 3 16:08:29 EST 2018
More information about the Python-Dev mailing list
Sat Feb 3 16:08:29 EST 2018
- Previous message (by thread): [Python-Dev] "threading.Lock().locked()" is not documented
- Next message (by thread): [Python-Dev] Is 4.0 a major breaking changes release?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Feb 3, 2018, at 11:25, Gregory P. Smith wrote: > 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. 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.
- Previous message (by thread): [Python-Dev] "threading.Lock().locked()" is not documented
- Next message (by thread): [Python-Dev] Is 4.0 a major breaking changes release?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list