summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-15 11:25:11 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-15 11:25:11 (GMT)
commit25d535ea6a443f467eacfc9f487c90120972ca7f (patch)
tree23feb014181a59162d9044813d8d562aee6885b6 /Doc/glossary.rst
parentecbf2dea367b8dd971ccf4f3e3814afbb9ed5af9 (diff)
downloadcpython-25d535ea6a443f467eacfc9f487c90120972ca7f.zip
cpython-25d535ea6a443f467eacfc9f487c90120972ca7f.tar.gz
cpython-25d535ea6a443f467eacfc9f487c90120972ca7f.tar.bz2
Merged revisions 84827-84829 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84827 | antoine.pitrou | 2010-09-15 11:58:26 +0200 (mer., 15 sept. 2010) | 3 lines Add a glossary entry for file objects. ........ r84828 | antoine.pitrou | 2010-09-15 12:08:31 +0200 (mer., 15 sept. 2010) | 3 lines Update file-related information in the FAQ. ........ r84829 | antoine.pitrou | 2010-09-15 13:11:28 +0200 (mer., 15 sept. 2010) | 3 lines Add cross-references to the glossary entry for file objects. ........
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 40f0869..5ecf848 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -178,6 +178,23 @@ Glossary
A module written in C or C++, using Python's C API to interact with the core and
with user code.
+ file object
+ An object exposing a file-oriented API (with methods such as
+ :meth:`read()` or :meth:`write()`) to an underlying resource.
+ Depending on the way it was created, a file object can mediate access
+ to a real on-disk file or to another other type of storage or
+ communication device (for example standard input/output, in-memory
+ buffers, sockets, pipes, etc.). File objects are also called
+ :dfn:`file-like objects` or :dfn:`streams`.
+
+ There are actually three categories of file objects: raw binary
+ files, buffered binary files and text files. Their interfaces are
+ defined in the :mod:`io` module. The canonical way to create a
+ file object is by using the :func:`open` function.
+
+ file-like object
+ A synonym for :term:`file object`.
+
finder
An object that tries to find the :term:`loader` for a module. It must
implement a method named :meth:`find_module`. See :pep:`302` for