summaryrefslogtreecommitdiff
path: root/docs/ref/files
diff options
context:
space:
mode:
authorIngo Klöcker <djangoproject@ingo-kloecker.de>2017-04-07 15:41:39 +0200
committerTim Graham <timograham@gmail.com>2017-05-31 21:02:58 -0400
commit6bb3b2bff4bca24896023758a720f16fa6b1e2bb (patch)
treeffc4886d045b62d30777797b63eaa7ab00005cfb /docs/ref/files
parenteee34ef64c026e3274c6d1b4fa2baffbc956b954 (diff)
Refs #27777 -- Improved docs/added test for File context manager change.
Diffstat (limited to 'docs/ref/files')
-rw-r--r--docs/ref/files/file.txt7
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__()