]> granicus.if.org Git - python/commitdiff
Issue #19795: Improved more markups of True/False.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 15:30:16 +0000 (18:30 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 15:30:16 +0000 (18:30 +0300)
Doc/c-api/number.rst
Doc/library/ctypes.rst
Doc/library/httplib.rst
Doc/library/logging.rst
Doc/library/ssl.rst
Doc/library/sysconfig.rst
Doc/library/xml.etree.elementtree.rst
Doc/whatsnew/2.7.rst

index 75b73416c8072c7fab518549492f06d00e31c6b7..39f0e78de0087ebc429d0ae2bbb52f0c7e350de9 100644 (file)
@@ -316,7 +316,7 @@ Number Protocol
 
 .. c:function:: int PyIndex_Check(PyObject *o)
 
-   Returns True if *o* is an index integer (has the nb_index slot of  the
-   tp_as_number structure filled in).
+   Returns ``1`` if *o* is an index integer (has the nb_index slot of  the
+   tp_as_number structure filled in), and ``0`` otherwise.
 
    .. versionadded:: 2.5
index 368c7856be08bcfa002c7fa5d3f8eb374e19bec7..01d5e1ab57c25c6d1995a6248085bf33c0c273e0 100644 (file)
@@ -1404,7 +1404,7 @@ details, consult the :manpage:`dlopen(3)` manpage.  On Windows, *mode* is
 ignored.  On posix systems, RTLD_NOW is always added, and is not
 configurable.
 
-The *use_errno* parameter, when set to True, enables a ctypes mechanism that
+The *use_errno* parameter, when set to true, enables a ctypes mechanism that
 allows accessing the system :data:`errno` error number in a safe way.
 :mod:`ctypes` maintains a thread-local copy of the systems :data:`errno`
 variable; if you call foreign functions created with ``use_errno=True`` then the
@@ -1415,7 +1415,7 @@ The function :func:`ctypes.get_errno` returns the value of the ctypes private
 copy, and the function :func:`ctypes.set_errno` changes the ctypes private copy
 to a new value and returns the former value.
 
-The *use_last_error* parameter, when set to True, enables the same mechanism for
+The *use_last_error* parameter, when set to true, enables the same mechanism for
 the Windows error code which is managed by the :func:`GetLastError` and
 :func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` and
 :func:`ctypes.set_last_error` are used to request and change the ctypes private
@@ -1631,7 +1631,7 @@ type and the argument types of the function.
 
    The returned function prototype creates functions that use the standard C
    calling convention.  The function will release the GIL during the call.  If
-   *use_errno* is set to True, the ctypes private copy of the system
+   *use_errno* is set to true, the ctypes private copy of the system
    :data:`errno` variable is exchanged with the real :data:`errno` value before
    and after the call; *use_last_error* does the same for the Windows error
    code.
index 4bf20067fa57112d6a1e342d26de586a7ff52cae..0a9a6dc902290e748c5e2f8101bab0ad4d21a33a 100644 (file)
@@ -49,7 +49,7 @@ The module provides the following classes:
    server.  It should be instantiated passing it a host and optional port
    number.  If no port number is passed, the port is extracted from the host
    string if it has the form ``host:port``, else the default HTTP port (80) is
-   used.  When True, the optional parameter *strict* (which defaults to a false
+   used.  When true, the optional parameter *strict* (which defaults to a false
    value) causes ``BadStatusLine`` to
    be raised if the status line can't be parsed as a valid HTTP/1.0 or 1.1
    status line.  If the optional *timeout* parameter is given, blocking
index 4e2948ab02821d8b1350536132b1b151cee73769..5c2f65cfbacb68edf6c05fbeb0acbde722bc4462 100644 (file)
@@ -1026,14 +1026,4 @@ with the :mod:`warnings` module.
       package available from this site is suitable for use with Python 1.5.2, 2.1.x
       and 2.2.x, which do not include the :mod:`logging` package in the standard
       library.
-<<<<<<<
-
-=======
-      :lno: The line number in the file where the logging call was made.
-      :msg: The logging message.
-      :args: The arguments for the logging message.
-      :exc_info: An exception tuple, or ``None``.
-      :func: The name of the function or method which invoked the logging
-             call.
-      :sinfo: A stack traceback such as is provided by
->>>>>>>
+
index 130248759ecfe974ca70aef1027ab35e9fce31bb..8849d0f3d781e891b3c10d6383b1e7a757a45464 100644 (file)
@@ -1246,7 +1246,7 @@ to speed up repeated connections from the same clients.
    This setting doesn't apply to client sockets.  You can also use the
    :data:`OP_SINGLE_ECDH_USE` option to further improve security.
 
-   This method is not available if :data:`HAS_ECDH` is False.
+   This method is not available if :data:`HAS_ECDH` is ``False``.
 
    .. seealso::
       `SSL/TLS & Perfect Forward Secrecy <http://vincent.bernat.im/en/blog/2011-ssl-perfect-forward-secrecy.html>`_
index 9dd0b1e8d4d0161a076bcba00084ecfabf26b30f..e8fc09e995707e06bdf365a63eea09a4af4599df 100644 (file)
@@ -152,7 +152,7 @@ identifier.  Python currently uses eight paths:
    If *vars* is provided, it must be a dictionary of variables that will
    update the dictionary used to expand the paths.
 
-   If *expand* is set to False, the paths will not be expanded.
+   If *expand* is set to false, the paths will not be expanded.
 
    If *scheme* is not an existing scheme, :func:`get_paths` will raise a
    :exc:`KeyError`.
index a431b0fa22ed2e9a4c1dcbbae2880740c2fa0060..08b677bddc94809f2ee2ebe4b6c190beb405fa94 100644 (file)
@@ -855,7 +855,7 @@ ElementTree Objects
       Writes the element tree to a file, as XML.  *file* is a file name, or a
       file object opened for writing.  *encoding* [1]_ is the output encoding
       (default is US-ASCII).  *xml_declaration* controls if an XML declaration
-      should be added to the file.  Use False for never, True for always, ``None``
+      should be added to the file.  Use ``False`` for never, ``True`` for always, ``None``
       for only if not US-ASCII or UTF-8 (default is ``None``).  *default_namespace*
       sets the default XML namespace (for "xmlns").  *method* is either
       ``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``).  Returns an
index 1b9bf3ec3f662e215ba2cfe2b0251a0e41b8cb75..6dd55215d6137f6c2fdfc3c10b7b2d10481a3925 100644 (file)
@@ -245,8 +245,8 @@ Deleting an entry and reinserting it will move it to the end::
     [('first', 1), ('third', 3), ('second', 5)]
 
 The :meth:`~collections.OrderedDict.popitem` method has an optional *last*
-argument that defaults to True.  If *last* is True, the most recently
-added key is returned and removed; if it's False, the
+argument that defaults to ``True``.  If *last* is true, the most recently
+added key is returned and removed; if it's false, the
 oldest key is selected::
 
     >>> od = OrderedDict([(x,0) for x in range(20)])
@@ -1503,7 +1503,7 @@ changes, or look through the Subversion logs for all the details.
 * The :mod:`SocketServer` module's :class:`~SocketServer.TCPServer` class now
   supports socket timeouts and disabling the Nagle algorithm.
   The :attr:`~SocketServer.TCPServer.disable_nagle_algorithm` class attribute
-  defaults to False; if overridden to be True,
+  defaults to ``False``; if overridden to be true,
   new request connections will have the TCP_NODELAY option set to
   prevent buffering many small sends into a single TCP packet.
   The :attr:`~SocketServer.BaseServer.timeout` class attribute can hold
@@ -1855,7 +1855,7 @@ The error messages for :meth:`~unittest.TestCase.assertEqual`,
 :meth:`~unittest.TestCase.assertTrue`, and :meth:`~unittest.TestCase.assertFalse`
 failures now provide more information.  If you set the
 :attr:`~unittest.TestCase.longMessage` attribute of your :class:`~unittest.TestCase` classes to
-True, both the standard error message and any additional message you
+true, both the standard error message and any additional message you
 provide will be printed for failures.  (Added by Michael Foord; :issue:`5663`.)
 
 The :meth:`~unittest.TestCase.assertRaises` method now
@@ -1962,7 +1962,7 @@ GvR worked on merging them into Python's version of :mod:`unittest`.
   sequence comparison methods do.
 
 :func:`unittest.main` now takes an optional ``exit`` argument.  If
-False, :func:`~unittest.main` doesn't call :func:`sys.exit`, allowing
+false, :func:`~unittest.main` doesn't call :func:`sys.exit`, allowing
 :func:`~unittest.main` to be used from the interactive interpreter.
 (Contributed by J. Pablo Fernández; :issue:`3379`.)