Commit dc0e3a89 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #19795: Improved more markups of True/False.

parent e3d5787a
...@@ -316,7 +316,7 @@ Number Protocol ...@@ -316,7 +316,7 @@ Number Protocol
.. c:function:: int PyIndex_Check(PyObject *o) .. c:function:: int PyIndex_Check(PyObject *o)
Returns True if *o* is an index integer (has the nb_index slot of the Returns ``1`` if *o* is an index integer (has the nb_index slot of the
tp_as_number structure filled in). tp_as_number structure filled in), and ``0`` otherwise.
.. versionadded:: 2.5 .. versionadded:: 2.5
...@@ -1404,7 +1404,7 @@ details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is ...@@ -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 ignored. On posix systems, RTLD_NOW is always added, and is not
configurable. 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. allows accessing the system :data:`errno` error number in a safe way.
:mod:`ctypes` maintains a thread-local copy of the systems :data:`errno` :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 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 ...@@ -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 copy, and the function :func:`ctypes.set_errno` changes the ctypes private copy
to a new value and returns the former value. 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 the Windows error code which is managed by the :func:`GetLastError` and
:func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` 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 :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. ...@@ -1631,7 +1631,7 @@ type and the argument types of the function.
The returned function prototype creates functions that use the standard C The returned function prototype creates functions that use the standard C
calling convention. The function will release the GIL during the call. If 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 :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 and after the call; *use_last_error* does the same for the Windows error
code. code.
......
...@@ -49,7 +49,7 @@ The module provides the following classes: ...@@ -49,7 +49,7 @@ The module provides the following classes:
server. It should be instantiated passing it a host and optional port 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 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 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 value) causes ``BadStatusLine`` to
be raised if the status line can't be parsed as a valid HTTP/1.0 or 1.1 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 status line. If the optional *timeout* parameter is given, blocking
......
...@@ -1026,14 +1026,4 @@ with the :mod:`warnings` module. ...@@ -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 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 and 2.2.x, which do not include the :mod:`logging` package in the standard
library. 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
>>>>>>>
...@@ -1246,7 +1246,7 @@ to speed up repeated connections from the same clients. ...@@ -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 This setting doesn't apply to client sockets. You can also use the
:data:`OP_SINGLE_ECDH_USE` option to further improve security. :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:: .. seealso::
`SSL/TLS & Perfect Forward Secrecy <http://vincent.bernat.im/en/blog/2011-ssl-perfect-forward-secrecy.html>`_ `SSL/TLS & Perfect Forward Secrecy <http://vincent.bernat.im/en/blog/2011-ssl-perfect-forward-secrecy.html>`_
......
...@@ -152,7 +152,7 @@ identifier. Python currently uses eight paths: ...@@ -152,7 +152,7 @@ identifier. Python currently uses eight paths:
If *vars* is provided, it must be a dictionary of variables that will If *vars* is provided, it must be a dictionary of variables that will
update the dictionary used to expand the paths. 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 If *scheme* is not an existing scheme, :func:`get_paths` will raise a
:exc:`KeyError`. :exc:`KeyError`.
......
...@@ -855,7 +855,7 @@ ElementTree Objects ...@@ -855,7 +855,7 @@ ElementTree Objects
Writes the element tree to a file, as XML. *file* is a file name, or a 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 file object opened for writing. *encoding* [1]_ is the output encoding
(default is US-ASCII). *xml_declaration* controls if an XML declaration (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* for only if not US-ASCII or UTF-8 (default is ``None``). *default_namespace*
sets the default XML namespace (for "xmlns"). *method* is either sets the default XML namespace (for "xmlns"). *method* is either
``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``). Returns an ``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``). Returns an
......
...@@ -245,8 +245,8 @@ Deleting an entry and reinserting it will move it to the end:: ...@@ -245,8 +245,8 @@ Deleting an entry and reinserting it will move it to the end::
[('first', 1), ('third', 3), ('second', 5)] [('first', 1), ('third', 3), ('second', 5)]
The :meth:`~collections.OrderedDict.popitem` method has an optional *last* The :meth:`~collections.OrderedDict.popitem` method has an optional *last*
argument that defaults to True. If *last* is True, the most recently argument that defaults to ``True``. If *last* is true, the most recently
added key is returned and removed; if it's False, the added key is returned and removed; if it's false, the
oldest key is selected:: oldest key is selected::
>>> od = OrderedDict([(x,0) for x in range(20)]) >>> od = OrderedDict([(x,0) for x in range(20)])
...@@ -1503,7 +1503,7 @@ changes, or look through the Subversion logs for all the details. ...@@ -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 * The :mod:`SocketServer` module's :class:`~SocketServer.TCPServer` class now
supports socket timeouts and disabling the Nagle algorithm. supports socket timeouts and disabling the Nagle algorithm.
The :attr:`~SocketServer.TCPServer.disable_nagle_algorithm` class attribute 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 new request connections will have the TCP_NODELAY option set to
prevent buffering many small sends into a single TCP packet. prevent buffering many small sends into a single TCP packet.
The :attr:`~SocketServer.BaseServer.timeout` class attribute can hold The :attr:`~SocketServer.BaseServer.timeout` class attribute can hold
...@@ -1855,7 +1855,7 @@ The error messages for :meth:`~unittest.TestCase.assertEqual`, ...@@ -1855,7 +1855,7 @@ The error messages for :meth:`~unittest.TestCase.assertEqual`,
:meth:`~unittest.TestCase.assertTrue`, and :meth:`~unittest.TestCase.assertFalse` :meth:`~unittest.TestCase.assertTrue`, and :meth:`~unittest.TestCase.assertFalse`
failures now provide more information. If you set the failures now provide more information. If you set the
:attr:`~unittest.TestCase.longMessage` attribute of your :class:`~unittest.TestCase` classes to :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`.) provide will be printed for failures. (Added by Michael Foord; :issue:`5663`.)
The :meth:`~unittest.TestCase.assertRaises` method now The :meth:`~unittest.TestCase.assertRaises` method now
...@@ -1962,7 +1962,7 @@ GvR worked on merging them into Python's version of :mod:`unittest`. ...@@ -1962,7 +1962,7 @@ GvR worked on merging them into Python's version of :mod:`unittest`.
sequence comparison methods do. sequence comparison methods do.
:func:`unittest.main` now takes an optional ``exit`` argument. If :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. :func:`~unittest.main` to be used from the interactive interpreter.
(Contributed by J. Pablo Fernández; :issue:`3379`.) (Contributed by J. Pablo Fernández; :issue:`3379`.)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment