@@ -600,26 +600,13 @@ File Object Creation
600600These functions create new :term: `file objects <file object> `. (See also :func: `open `.)
601601
602602
603- .. function :: fdopen(fd[, mode[, bufsize]] )
603+ .. function :: fdopen(fd, *args, **kwargs )
604604
605- .. index :: single: I/O control; buffering
605+ Return an open file object connected to the file descriptor *fd *.
606+ This is an alias of :func: `open ` and accepts the same arguments.
607+ The only difference is that the first argument of :func: `fdopen `
608+ must always be an integer.
606609
607- Return an open file object connected to the file descriptor *fd *. The *mode *
608- and *bufsize * arguments have the same meaning as the corresponding arguments to
609- the built-in :func: `open ` function.
610-
611- When specified, the *mode * argument must start with one of the letters
612- ``'r' ``, ``'w' ``, ``'x' `` or ``'a' ``, otherwise a :exc: `ValueError ` is
613- raised.
614-
615- On Unix, when the *mode * argument starts with ``'a' ``, the *O_APPEND * flag is
616- set on the file descriptor (which the :c:func: `fdopen ` implementation already
617- does on most platforms).
618-
619- Availability: Unix, Windows.
620-
621- .. versionchanged :: 3.3
622- The ``'x' `` mode was added.
623610
624611.. _os-fd-ops :
625612
0 commit comments