I'm trying to find where the __enter__ and __exit__ methods of threading objects are documented for Python 2.7. The main documentation page on the topic has nothing of sort. Is this documented at all?
Is it, perhaps, so obvious what they should do, that I'm asking a nonsensical question? It's certainly not obvious to me. In my understanding, __enter__ should acquire a lock, and __exit__ should release it, but lock acquisition comes with optional parameters (blocking / non-blocking), so it's a bit ambiguous, at least to myself.