Skip to content

Commit 310a08e

Browse files
Евгений БлиновЕвгений Блинов
authored andcommitted
Fix typo in AsyncContextLockProtocol doc: "asynchronous context manager"
→ "async context manager"
1 parent 1f38547 commit 310a08e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ LockProtocol
8686
└── AsyncContextLockProtocol
8787
```
8888

89-
`ContextLockProtocol` describes objects that satisfy `LockProtocol` and also implement the [context manager protocol](https://docs.python.org/3/library/stdtypes.html#typecontextmanager). `AsyncContextLockProtocol`, similarly, describes objects that satisfy `LockProtocol` and implement the [asynchronous context manager](https://docs.python.org/3/reference/datamodel.html#async-context-managers) protocol.
89+
`ContextLockProtocol` describes objects that satisfy `LockProtocol` and also implement the [context manager protocol](https://docs.python.org/3/library/stdtypes.html#typecontextmanager). Similarly,`AsyncContextLockProtocol` describes objects that satisfy `LockProtocol` and implement the [asynchronous context manager](https://docs.python.org/3/reference/datamodel.html#async-context-managers) protocol.
9090

9191
Almost all standard library locks, as well as `SmartLock`, satisfy `ContextLockProtocol`:
9292

@@ -102,7 +102,7 @@ print(isinstance(TRLock(), ContextLockProtocol)) # True
102102
print(isinstance(SmartLock(), ContextLockProtocol)) # True
103103
```
104104

105-
However, the [`Lock` from asyncio](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock) belongs to a separate category and `AsyncContextLockProtocol` is needed to describe it:
105+
However, the [`asyncio.Lock`](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock) belongs to a separate category and `AsyncContextLockProtocol` is needed to describe it:
106106

107107
```python
108108
from asyncio import Lock

0 commit comments

Comments
 (0)