summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-05-24 18:44:07 (GMT)
committerPetri Lehtinen <petri@digip.org>2012-05-24 18:46:36 (GMT)
commit1a01ebc41cbbfc127865f82656879a58c2560543 (patch)
treedd1057c66230629dec11d19965c4c90c9a3a12f4 /Doc/library/os.rst
parent2fc5a5080923f243a78b13cca0fd09f8db26eff6 (diff)
downloadcpython-1a01ebc41cbbfc127865f82656879a58c2560543.zip
cpython-1a01ebc41cbbfc127865f82656879a58c2560543.tar.gz
cpython-1a01ebc41cbbfc127865f82656879a58c2560543.tar.bz2
#14863: Update the documentation of os.fdopen()
There's no bufsize argument anymore, and os.fdopen() is only a very thin wrapper around open() anymore. Change the documentation to reflect that.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst20
1 files changed, 5 insertions, 15 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 3f43338..5991e29 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -545,22 +545,12 @@ File Object Creation
These functions create new :term:`file objects <file object>`. (See also :func:`open`.)
-.. function:: fdopen(fd[, mode[, bufsize]])
+.. function:: fdopen(fd, *args, **kwargs)
- .. index:: single: I/O control; buffering
-
- Return an open file object connected to the file descriptor *fd*. The *mode*
- and *bufsize* arguments have the same meaning as the corresponding arguments to
- the built-in :func:`open` function.
-
- When specified, the *mode* argument must start with one of the letters
- ``'r'``, ``'w'``, or ``'a'``, otherwise a :exc:`ValueError` is raised.
-
- On Unix, when the *mode* argument starts with ``'a'``, the *O_APPEND* flag is
- set on the file descriptor (which the :c:func:`fdopen` implementation already
- does on most platforms).
-
- Availability: Unix, Windows.
+ Return an open file object connected to the file descriptor *fd*.
+ This is an alias of :func:`open` and accepts the same arguments.
+ The only difference is that the first argument of :func:`fdopen`
+ must always be an integer.
.. _os-fd-ops: