(original) (raw)
changeset: 104566:dd7e48e3e5b0 branch: 2.7 parent: 104556:b7df6c09ddf9 user: Serhiy Storchaka storchaka@gmail.com date: Wed Oct 19 18:30:16 2016 +0300 files: 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 description: Issue #19795: Improved more markups of True/False. diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/c-api/number.rst --- a/Doc/c-api/number.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/c-api/number.rst Wed Oct 19 18:30:16 2016 +0300 @@ -316,7 +316,7 @@ .. 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 diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/library/ctypes.rst --- a/Doc/library/ctypes.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/library/ctypes.rst Wed Oct 19 18:30:16 2016 +0300 @@ -1404,7 +1404,7 @@ 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 @@ 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 @@ 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. diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/library/httplib.rst --- a/Doc/library/httplib.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/library/httplib.rst Wed Oct 19 18:30:16 2016 +0300 @@ -49,7 +49,7 @@ 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 diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/library/logging.rst --- a/Doc/library/logging.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/library/logging.rst Wed Oct 19 18:30:16 2016 +0300 @@ -1026,14 +1026,4 @@ 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 ->>>>>>> diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/library/ssl.rst --- a/Doc/library/ssl.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/library/ssl.rst Wed Oct 19 18:30:16 2016 +0300 @@ -1246,7 +1246,7 @@ 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 `_ diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/library/sysconfig.rst --- a/Doc/library/sysconfig.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/library/sysconfig.rst Wed Oct 19 18:30:16 2016 +0300 @@ -152,7 +152,7 @@ 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`. diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/library/xml.etree.elementtree.rst --- a/Doc/library/xml.etree.elementtree.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/library/xml.etree.elementtree.rst Wed Oct 19 18:30:16 2016 +0300 @@ -855,7 +855,7 @@ 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 diff -r b7df6c09ddf9 -r dd7e48e3e5b0 Doc/whatsnew/2.7.rst --- a/Doc/whatsnew/2.7.rst Wed Oct 19 16:43:18 2016 +0300 +++ b/Doc/whatsnew/2.7.rst Wed Oct 19 18:30:16 2016 +0300 @@ -245,8 +245,8 @@ [('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 @@ * 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 @@ :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 @@ 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`.)/storchaka@gmail.com