summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doc/library/stdtypes.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index b383a40829..09ba2538fa 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2110,6 +2110,11 @@ Files have the following methods:
Flush the internal buffer, like ``stdio``'s :cfunc:`fflush`. This may be a
no-op on some file-like objects.
+ .. note::
+
+ :meth:`flush` does not necessarily write the file's data to disk. Use
+ :meth:`flush` followed by :func:`os.fsync` to ensure this behavior.
+
.. method:: file.fileno()