summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-01-04 18:50:53 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-01-04 18:50:53 (GMT)
commit4adb288f4eaea3a21295c11a3ca49313d7da8cc7 (patch)
tree84821f5b594c91134847979997663ce070cbfc57 /Doc/reference
parent6e40e27ecfe417ab4633c46b8ac99d30ebad6b36 (diff)
downloadcpython-4adb288f4eaea3a21295c11a3ca49313d7da8cc7.zip
cpython-4adb288f4eaea3a21295c11a3ca49313d7da8cc7.tar.gz
cpython-4adb288f4eaea3a21295c11a3ca49313d7da8cc7.tar.bz2
Issue #7631: Fix undefined references to the "built-in file object", which
has ceased to be.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst23
1 files changed, 13 insertions, 10 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 36fc575..78f96df 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -767,10 +767,10 @@ Class instances
Special attributes: :attr:`__dict__` is the attribute dictionary;
:attr:`__class__` is the instance's class.
-Files
+I/O objects (also known as file objects)
.. index::
- object: file
builtin: open
+ module: io
single: popen() (in module os)
single: makefile() (socket method)
single: sys.stdin
@@ -781,14 +781,17 @@ Files
single: stdout (in module sys)
single: stderr (in module sys)
- A file object represents an open file. File objects are created by the
- :func:`open` built-in function, and also by :func:`os.popen`,
- :func:`os.fdopen`, and the :meth:`makefile` method of socket objects (and
- perhaps by other functions or methods provided by extension modules). The
- objects ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are initialized to
- file objects corresponding to the interpreter's standard input, output and
- error streams. See :ref:`bltin-file-objects` for complete documentation of
- file objects.
+ A file object represents an open file. Various shortcuts are available
+ to create file objects: the :func:`open` built-in function, and also
+ :func:`os.popen`, :func:`os.fdopen`, and the :meth:`makefile` method
+ of socket objects (and perhaps by other functions or methods provided
+ by extension modules).
+
+ The objects ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are
+ initialized to file objects corresponding to the interpreter's standard
+ input, output and error streams; they are all open in text mode and
+ therefore follow the interface defined by the :class:`io.TextIOBase`
+ abstract class.
Internal types
.. index::