Commit 1a01ebc4 authored by Petri Lehtinen's avatar Petri Lehtinen

#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.
parent 2fc5a508
...@@ -545,22 +545,12 @@ File Object Creation ...@@ -545,22 +545,12 @@ File Object Creation
These functions create new :term:`file objects <file object>`. (See also :func:`open`.) 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*.
This is an alias of :func:`open` and accepts the same arguments.
Return an open file object connected to the file descriptor *fd*. The *mode* The only difference is that the first argument of :func:`fdopen`
and *bufsize* arguments have the same meaning as the corresponding arguments to must always be an integer.
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.
.. _os-fd-ops: .. _os-fd-ops:
......
...@@ -67,6 +67,9 @@ Core and Builtins ...@@ -67,6 +67,9 @@ Core and Builtins
Library Library
------- -------
- Issue #14863: Update the documentation of os.fdopen() to reflect the
fact that it's only a thin wrapper around open() anymore.
- Issue #14036: Add an additional check to validate that port in urlparse does - Issue #14036: Add an additional check to validate that port in urlparse does
not go in illegal range and returns None. not go in illegal range and returns None.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment