Fixed #27777 -- Made File.open() work with the with statement (#8310)

Fixed #27777 -- Made File.open() work with the with statement
This commit is contained in:
Ingo Klöcker 2017-04-07 14:21:06 +02:00 committed by Florian Apolloner
parent 695d4dd790
commit c4536c4a54
6 changed files with 43 additions and 1 deletions

View file

@ -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