[Python-3000-checkins] r58613 - python/branches/py3k/Doc/c-api/abstract.rst python/branches/py3k/Doc/c-api/concrete.rst
georg.brandl
python-3000-checkins at python.org
Tue Oct 23 20:26:17 CEST 2007
Author: georg.brandl
Date: Tue Oct 23 20:26:17 2007
New Revision: 58613
Modified:
python/branches/py3k/Doc/c-api/abstract.rst
python/branches/py3k/Doc/c-api/concrete.rst
Log:
Remove duplicate entry for PyObject_AsFileDescriptor.
Modified: python/branches/py3k/Doc/c-api/abstract.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/abstract.rst (original)
+++ python/branches/py3k/Doc/c-api/abstract.rst Tue Oct 23 20:26:17 2007
@@ -327,10 +327,7 @@
.. cfunction:: int PyObject_AsFileDescriptor(PyObject *o)
- Derives a file-descriptor from a Python object. If the object is an integer or
- long integer, its value is returned. If not, the object's :meth:`fileno` method
- is called if it exists; the method must return an integer or long integer, which
- is returned as the file descriptor value. Returns ``-1`` on failure.
+ Derives a file-descriptor from a Python object.
.. cfunction:: PyObject* PyObject_Dir(PyObject *o)
Modified: python/branches/py3k/Doc/c-api/concrete.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/concrete.rst (original)
+++ python/branches/py3k/Doc/c-api/concrete.rst Tue Oct 23 20:26:17 2007
@@ -2420,13 +2420,17 @@
.. warning::
Take care when you are mixing streams and descriptors! For more
- information, see `GNU C Library
+ information, see `the GNU C Library docs
<http://www.gnu.org/software/libc/manual/html_node/Stream_002fDescriptor-Precautions.html#Stream_002fDescriptor-Precautions>`_.
.. cfunction:: int PyObject_AsFileDescriptor(PyObject *p)
- Return the file descriptor associated with *p* as an :ctype:`int`.
+ Return the file descriptor associated with *p* as an :ctype:`int`. If the
+ object is an integer or long integer, its value is returned. If not, the
+ object's :meth:`fileno` method is called if it exists; the method must return
+ an integer, which is returned as the file descriptor value. Sets an
+ exception and returns ``-1`` on failure.
.. cfunction:: PyObject* PyFile_GetLine(PyObject *p, int n)
More information about the Python-3000-checkins
mailing list