summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/file.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-09 10:26:17 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-09 10:26:17 (GMT)
commit0b68a2d67538703b13d4a824acf736f8ef103dad (patch)
tree24f48762bab91bc3e602a5bc54d346f1427a1a36 /Doc/c-api/file.rst
parent91aaeac0508feebc0b7aa436e634892a472e7e93 (diff)
downloadcpython-0b68a2d67538703b13d4a824acf736f8ef103dad.zip
cpython-0b68a2d67538703b13d4a824acf736f8ef103dad.tar.gz
cpython-0b68a2d67538703b13d4a824acf736f8ef103dad.tar.bz2
Issue 19195: Improved cross-references in C API documentation.
Diffstat (limited to 'Doc/c-api/file.rst')
-rw-r--r--Doc/c-api/file.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/c-api/file.rst b/Doc/c-api/file.rst
index c5a4a59..cc190c9 100644
--- a/Doc/c-api/file.rst
+++ b/Doc/c-api/file.rst
@@ -40,9 +40,9 @@ the :mod:`io` APIs instead.
Return the file descriptor associated with *p* as an :c:type:`int`. If the
object is an 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.
+ object's :meth:`~io.IOBase.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.
.. c:function:: PyObject* PyFile_GetLine(PyObject *p, int n)
@@ -50,7 +50,8 @@ the :mod:`io` APIs instead.
.. index:: single: EOFError (built-in exception)
Equivalent to ``p.readline([n])``, this function reads one line from the
- object *p*. *p* may be a file object or any object with a :meth:`readline`
+ object *p*. *p* may be a file object or any object with a
+ :meth:`~io.IOBase.readline`
method. If *n* is ``0``, exactly one line is read, regardless of the length of
the line. If *n* is greater than ``0``, no more than *n* bytes will be read
from the file; a partial line can be returned. In both cases, an empty string