mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #27777 -- Made File.open() work with the with statement
This commit is contained in:
parent
695d4dd790
commit
c4536c4a54
6 changed files with 43 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue