diff options
| author | Ingo Klöcker <ingokloecker@users.noreply.github.com> | 2017-04-07 14:21:06 +0200 |
|---|---|---|
| committer | Florian Apolloner <apollo13@users.noreply.github.com> | 2017-04-07 14:21:06 +0200 |
| commit | c4536c4a54282cd89bc815b58cc3c73280712df1 (patch) | |
| tree | 3d425bbaaafe0cffd5d7ad19cf1f733fa805d975 /docs/ref/files | |
| parent | 695d4dd7908ca32e118716b474c23b43727579d2 (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.txt | 3 |
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 |
