mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #27777 -- Made File.open() work with the with statement
This commit is contained in:
committed by
Florian Apolloner
parent
695d4dd790
commit
c4536c4a54
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user