[issue13050] RLock support the context manager protocol but this is not documented

New submission from Brian Brazil <brian.brazil@gmail.com>: This is already documented: http://docs.python.org/library/threading.html#using-locks-conditions-and-sem... ---------- nosy: +bbrazil _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13050> _______________________________________

R. David Murray <rdmurray@bitdance.com> added the comment: Hmm. But what I did was look up the RLock section of the manual to answer the question "does this support the context manager protocol", and the answer appeared to be no. In a reference manual I would expect all the important features of an object to be described in that object's documentation, or linked to therefrom. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13050> _______________________________________

Aaron Maenpaa <aaron@maenpaa.ca> added the comment: Here is a patch that adds an note about using Locks, RLocks, Conditions, and Semaphores as context managers to each of their descriptions as well as a link to the "Using locks, conditions, and semaphores in the with statement" section. ---------- keywords: +patch nosy: +zacherates versions: +Python 3.3 Added file: http://bugs.python.org/file24167/issue13050.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13050> _______________________________________

Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: This edit looks reasonable. ---------- nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13050> _______________________________________

Michal Nowikowski <godfryd@gmail.com> added the comment: It looks that it is already documented by 76228:2040842626ba changeset. The bug can be closed. ---------- nosy: +godfryd _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13050> _______________________________________

Georg Brandl added the comment: Thanks, closing. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13050> _______________________________________
participants (6)
-
Aaron Maenpaa
-
Brian Brazil
-
Georg Brandl
-
Michal Nowikowski
-
R. David Murray
-
Raymond Hettinger