summaryrefslogtreecommitdiff
path: root/docs/ref/files
diff options
context:
space:
mode:
authorIngo Klöcker <ingokloecker@users.noreply.github.com>2017-04-07 14:21:06 +0200
committerFlorian Apolloner <apollo13@users.noreply.github.com>2017-04-07 14:21:06 +0200
commitc4536c4a54282cd89bc815b58cc3c73280712df1 (patch)
tree3d425bbaaafe0cffd5d7ad19cf1f733fa805d975 /docs/ref/files
parent695d4dd7908ca32e118716b474c23b43727579d2 (diff)
Fixed #27777 -- Made File.open() work with the with statement (#8310)
Fixed #27777 -- Made File.open() work with the with statement
Diffstat (limited to 'docs/ref/files')
-rw-r--r--docs/ref/files/file.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/ref/files/file.txt b/docs/ref/files/file.txt
index 803f060c29..d79ae57f47 100644
--- a/docs/ref/files/file.txt
+++ b/docs/ref/files/file.txt
@@ -56,6 +56,9 @@ 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.
+
.. method:: read(num_bytes=None)
Read content from the file. The optional ``size`` is the number of