From c4536c4a54282cd89bc815b58cc3c73280712df1 Mon Sep 17 00:00:00 2001 From: Ingo Klöcker Date: Fri, 7 Apr 2017 14:21:06 +0200 Subject: Fixed #27777 -- Made File.open() work with the with statement (#8310) Fixed #27777 -- Made File.open() work with the with statement --- docs/ref/files/file.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') 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 -- cgit v1.3