[Python-checkins] cpython: Minor clarification about fdopen().
georg.brandl
python-checkins at python.org
Sun Jun 24 13:25:02 CEST 2012
http://hg.python.org/cpython/rev/2548cd22992c
changeset: 77697:2548cd22992c
user: Georg Brandl <georg at python.org>
date: Sun Jun 24 13:24:56 2012 +0200
summary:
Minor clarification about fdopen().
files:
Doc/library/os.rst | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -600,15 +600,16 @@
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:`~os.open` for opening file descriptors.)
.. function:: fdopen(fd, *args, **kwargs)
- 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.
+ Return an open file object connected to the file descriptor *fd*. This is an
+ alias of the :func:`open` built-in function and accepts the same arguments.
+ The only difference is that the first argument of :func:`fdopen` must always
+ be an integer.
.. _os-fd-ops:
@@ -952,10 +953,10 @@
.. note::
This function is intended for low-level I/O and must be applied to a file
- descriptor as returned by :func:`os.open` or :func:`pipe`. To read a "file object"
- returned by the built-in function :func:`open` or by :func:`popen` or
- :func:`fdopen`, or :data:`sys.stdin`, use its :meth:`~file.read` or
- :meth:`~file.readline` methods.
+ descriptor as returned by :func:`os.open` or :func:`pipe`. To read a
+ "file object" returned by the built-in function :func:`open` or by
+ :func:`popen` or :func:`fdopen`, or :data:`sys.stdin`, use its
+ :meth:`~file.read` or :meth:`~file.readline` methods.
.. function:: sendfile(out, in, offset, nbytes)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list