mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
Issue #22369: Change "context manager protocol" to "context management protocol".
This commit is contained in:
parent
964feabd79
commit
148679982f
16 changed files with 41 additions and 41 deletions
|
@ -63,7 +63,7 @@ class Lock:
|
|||
|
||||
acquire() is a coroutine and should be called with 'yield from'.
|
||||
|
||||
Locks also support the context manager protocol. '(yield from lock)'
|
||||
Locks also support the context management protocol. '(yield from lock)'
|
||||
should be used as context manager expression.
|
||||
|
||||
Usage:
|
||||
|
@ -376,7 +376,7 @@ class Semaphore:
|
|||
can never go below zero; when acquire() finds that it is zero, it blocks,
|
||||
waiting until some other thread calls release().
|
||||
|
||||
Semaphores also support the context manager protocol.
|
||||
Semaphores also support the context management protocol.
|
||||
|
||||
The optional argument gives the initial value for the internal
|
||||
counter; it defaults to 1. If the value given is less than 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue