summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-01-04 19:55:11 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-01-04 19:55:11 (GMT)
commitfa833950bf8c99ead3e4c793982716e684000b14 (patch)
tree57aa804f9814b8f15173cc84ef4015898c53ab2f /Doc/reference
parent593d0f46703dd6bf3619ea7113d230a77d20778c (diff)
downloadcpython-fa833950bf8c99ead3e4c793982716e684000b14.zip
cpython-fa833950bf8c99ead3e4c793982716e684000b14.tar.gz
cpython-fa833950bf8c99ead3e4c793982716e684000b14.tar.bz2
Merged revisions 77300 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r77300 | antoine.pitrou | 2010-01-04 19:50:53 +0100 (lun., 04 janv. 2010) | 4 lines 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::