Issue 17091: thread.lock.acquire docstring bug (original) (raw)
Issue17091
Created on 2013-01-31 16:58 by arigo, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
doc_fix.txt | icordasc,2013-02-04 02:54 | review |
Messages (6) | ||
---|---|---|
msg181035 - (view) | Author: Armin Rigo (arigo) * ![]() |
Date: 2013-01-31 16:58 |
The docstring of thread.lock.acquire() (or _thread on Python 3) is bogus: it says that if called without argument, the return value is None; it is only if called with a "blocking" argument that it returns True or False. But since a long time it was always returning a boolean, never None. | ||
msg181306 - (view) | Author: Ian Cordasco (icordasc) * | Date: 2013-02-04 02:15 |
Was this already taken care of? http://docs.python.org/2/library/thread.html?highlight=thread.lock#thread.lock.acquire and http://docs.python.org/3.3/library/_thread.html?highlight=thread.lock#_thread.lock.acquire don't make any mention of returning None. | ||
msg181307 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2013-02-04 02:27 |
Armin is talking about the docstring, not the docs. That is, what you get if you do help(x.acquire), where x is a Lock object, at the Python prompt. | ||
msg181308 - (view) | Author: Ian Cordasco (icordasc) * | Date: 2013-02-04 02:54 |
Thanks. I couldn't find it in the source but I just found Modules/_threadmodule.c I tested the method from the interpreter to confirm the changes I was making to the docstring. Attached is a diff that covers the change. | ||
msg181333 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2013-02-04 15:30 |
New changeset 0cc51c04aa20 by R David Murray in branch '3.2': #17091: update docstring for _thread.Lock.acquire. http://hg.python.org/cpython/rev/0cc51c04aa20 New changeset b414b2dfd3d3 by R David Murray in branch '3.3': merge #17091: update docstring for _thread.Lock.acquire. http://hg.python.org/cpython/rev/b414b2dfd3d3 New changeset a80abb179ba1 by R David Murray in branch 'default': merge #17091: update docstring for _thread.Lock.acquire. http://hg.python.org/cpython/rev/a80abb179ba1 New changeset 20f0c5398e97 by R David Murray in branch '2.7': #17091: update docstring for _thread.Lock.acquire. http://hg.python.org/cpython/rev/20f0c5398e97 | ||
msg181335 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2013-02-04 15:31 |
Thanks, Ian. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:41 | admin | set | github: 61293 |
2013-02-04 15:31:42 | r.david.murray | set | status: open -> closedversions: + Python 3.2messages: + resolution: fixedstage: resolved |
2013-02-04 15:30:18 | python-dev | set | nosy: + python-devmessages: + |
2013-02-04 02:54:26 | icordasc | set | files: + doc_fix.txtmessages: + |
2013-02-04 02:28:03 | r.david.murray | set | versions: + Python 3.3, Python 3.4, - Python 3.5 |
2013-02-04 02:27:34 | r.david.murray | set | nosy: + r.david.murraymessages: + |
2013-02-04 02:15:51 | icordasc | set | nosy: + icordascmessages: + |
2013-01-31 16:58:07 | arigo | create |