]> granicus.if.org Git - python/commitdiff
Issue #19795: Improved more markups of True/False.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 15:36:51 +0000 (18:36 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 15:36:51 +0000 (18:36 +0300)
1  2 
Doc/library/asyncio-eventloop.rst
Doc/library/ctypes.rst
Doc/library/readline.rst
Doc/library/ssl.rst
Doc/library/subprocess.rst
Doc/library/sysconfig.rst
Doc/library/zipfile.rst
Doc/whatsnew/3.3.rst

Simple merge
Simple merge
index 37e400ecebf221ff76d97b86702531fe21f395ec,4d3c099ed225adaa4671ade89a82f55bda5bbe23..54c54b461ce7e43ed006829a04b10dd5ad104601
@@@ -167,20 -167,6 +167,20 @@@ The following functions operate on a gl
     This calls :c:func:`add_history` in the underlying library.
  
  
-    that when true, enables auto history, and that when False, disables
 +.. function:: set_auto_history(enabled)
 +
 +   Enable or disable automatic calls to :c:func:`add_history` when reading
 +   input via readline.  The *enabled* argument should be a Boolean value
++   that when true, enables auto history, and that when false, disables
 +   auto history.
 +
 +   .. versionadded:: 3.6
 +
 +   .. impl-detail::
 +      Auto history is enabled by default, and changes to this do not persist
 +      across multiple sessions.
 +
 +
  Startup hooks
  -------------
  
Simple merge
index 26cf5bcfc6b0c28680c5e10f39cf6885a333e1eb,c1b28f8fc359bc41e1174f4bc49d36634203930b..ad2abe824536227462a02b158794472effc24e73
@@@ -61,20 -60,15 +61,20 @@@ compatibility with older versions, see 
  
     The *input* argument is passed to :meth:`Popen.communicate` and thus to the
     subprocess's stdin.  If used it must be a byte sequence, or a string if
-    *encoding* or *errors* is specified or *universal_newlines* is True.  When
 -   ``universal_newlines=True``.  When used, the internal :class:`Popen` object
 -   is automatically created with ``stdin=PIPE``, and the *stdin* argument may
 -   not be used as well.
++   *encoding* or *errors* is specified or *universal_newlines* is true.  When
 +   used, the internal :class:`Popen` object is automatically created with
 +   ``stdin=PIPE``, and the *stdin* argument may not be used as well.
  
-    If *check* is True, and the process exits with a non-zero exit code, a
+    If *check* is true, and the process exits with a non-zero exit code, a
     :exc:`CalledProcessError` exception will be raised. Attributes of that
     exception hold the arguments, the exit code, and stdout and stderr if they
     were captured.
  
-    If *encoding* or *errors* are specified, or *universal_newlines* is True,
++   If *encoding* or *errors* are specified, or *universal_newlines* is true,
 +   file objects for stdin, stdout and stderr are opened in text mode using the
 +   specified *encoding* and *errors* or the :class:`io.TextIOWrapper` default.
 +   Otherwise, file objects are opened in binary mode.
 +
     Examples::
  
        >>> subprocess.run(["ls", "-l"])  # doesn't capture output
@@@ -259,22 -249,19 +259,22 @@@ default values. The arguments that are 
     .. index::
        single: universal newlines; subprocess module
  
-    If *encoding* or *errors* are specified, or *universal_newlines* is True,
 -   If *universal_newlines* is ``False`` the file objects *stdin*, *stdout* and
 -   *stderr* will be opened as binary streams, and no line ending conversion is
 -   done.
++   If *encoding* or *errors* are specified, or *universal_newlines* is true,
 +   the file objects *stdin*, *stdout* and *stderr* will be opened in text
 +   mode using the *encoding* and *errors* specified in the call or the
 +   defaults for :class:`io.TextIOWrapper`.
 +
 +   For *stdin*, line ending characters ``'\n'`` in the input will be converted
 +   to the default line separator :data:`os.linesep`. For *stdout* and *stderr*,
 +   all line endings in the output will be converted to ``'\n'``.  For more
 +   information see the documentation of the :class:`io.TextIOWrapper` class
 +   when the *newline* argument to its constructor is ``None``.
  
 -   If *universal_newlines* is ``True``, these file objects
 -   will be opened as text streams in :term:`universal newlines` mode
 -   using the encoding returned by :func:`locale.getpreferredencoding(False)
 -   <locale.getpreferredencoding>`.  For *stdin*, line ending characters
 -   ``'\n'`` in the input will be converted to the default line separator
 -   :data:`os.linesep`.  For *stdout* and *stderr*, all line endings in the
 -   output will be converted to ``'\n'``.  For more information see the
 -   documentation of the :class:`io.TextIOWrapper` class when the *newline*
 -   argument to its constructor is ``None``.
 +   If text mode is not used, *stdin*, *stdout* and *stderr* will be opened as
 +   binary streams. No encoding or line ending conversion is performed.
 +
 +   .. versionadded:: 3.6
 +      Added *encoding* and *errors* parameters.
  
     .. note::
  
Simple merge
index bf52fa31ae1a5cb9586f691c0cf65880cd826c9f,1d6526ce95f0412e6dd6486a4e93b0f7ee32625e..47ba0b521e1ddc9e7cda7be7877c96e7338a6040
@@@ -498,31 -465,7 +498,31 @@@ Instances of the :class:`ZipInfo` clas
  :meth:`.infolist` methods of :class:`ZipFile` objects.  Each object stores
  information about a single member of the ZIP archive.
  
 -Instances have the following attributes:
 +There is one classmethod to make a :class:`ZipInfo` instance for a filesystem
 +file:
 +
 +.. classmethod:: ZipInfo.from_file(filename, arcname=None)
 +
 +   Construct a :class:`ZipInfo` instance for a file on the filesystem, in
 +   preparation for adding it to a zip file.
 +
 +   *filename* should be the path to a file or directory on the filesystem.
 +
 +   If *arcname* is specified, it is used as the name within the archive.
 +   If *arcname* is not specified, the name will be the same as *filename*, but
 +   with any drive letter and leading path separators removed.
 +
 +   .. versionadded:: 3.6
 +
 +Instances have the following methods and attributes:
 +
 +.. method:: ZipInfo.is_dir()
 +
-    Return True if this archive member is a directory.
++   Return ``True`` if this archive member is a directory.
 +
 +   This uses the entry's name: directories should always end with ``/``.
 +
 +   .. versionadded:: 3.6
  
  
  .. attribute:: ZipInfo.filename
Simple merge