diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/files/file.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/ref/files/file.txt b/docs/ref/files/file.txt index d99e1add2c..5e447bd1ca 100644 --- a/docs/ref/files/file.txt +++ b/docs/ref/files/file.txt @@ -56,8 +56,11 @@ The ``File`` class was originally opened with; ``None`` means to reopen with the original mode. - Returns ``self``, so that it can be used similar to Python's - built-in :func:`python:open()` with the ``with`` statement. + It can be used as a context manager, e.g. ``with file.open() as f:``. + + .. versionchanged:: 2.0 + + Context manager support was added. .. method:: __iter__() |
