]> granicus.if.org Git - python/commitdiff
Merge #15694: reflow paragraph.
authorR David Murray <rdmurray@bitdance.com>
Sat, 18 Aug 2012 00:40:03 +0000 (20:40 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 18 Aug 2012 00:40:03 +0000 (20:40 -0400)
1  2 
Doc/library/functions.rst

index e063895428bb8d30384ab7d754deb587266e7fff,b3238b154b8c3686a494912862a396e59b22eb6b..ddc946bb40600567df27c6929c400c7d47c16f12
@@@ -903,20 -903,9 +903,19 @@@ are always available.  They are listed 
     closed.  If a filename is given *closefd* has no effect and must be ``True``
     (the default).
  
 +   A custom opener can be used by passing a callable as *opener*. The underlying
 +   file descriptor for the file object is then obtained by calling *opener* with
 +   (*file*, *flags*). *opener* must return an open file descriptor (passing
 +   :mod:`os.open` as *opener* results in functionality similar to passing
 +   ``None``).
 +
 +   .. versionchanged:: 3.3
 +      The *opener* parameter was added.
 +      The ``'x'`` mode was added.
 +
     The type of :term:`file object` returned by the :func:`open` function
-    depends on the
-    mode.  When :func:`open` is used to open a file in a text mode (``'w'``,
-    ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of
+    depends on the mode.  When :func:`open` is used to open a file in a text
+    mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of
     :class:`io.TextIOBase` (specifically :class:`io.TextIOWrapper`).  When used
     to open a file in a binary mode with buffering, the returned class is a
     subclass of :class:`io.BufferedIOBase`.  The exact class varies: in read