Skip to content

Commit 0d301f1

Browse files
committed
PYTHON-3295 Improve description of nested timeout() calls
1 parent c106c08 commit 0d301f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymongo/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def timeout(seconds: Optional[float]) -> ContextManager:
142142
else:
143143
print(f"failed with non-timeout error: {exc!r}")
144144
145-
When nesting :func:`~pymongo.timeout`, the newly computed deadline is capped to at most
146-
the existing deadline. The deadline can only be shortened, not extended.
145+
When nesting :func:`~pymongo.timeout`, the nested deadline is capped by
146+
the outer deadline. The deadline can only be shortened, not extended.
147147
When exiting the block, the previous deadline is restored::
148148
149149
with pymongo.timeout(5):

0 commit comments

Comments
 (0)