cpython: 9fc0f20ea7de (original) (raw)
Mercurial > cpython
changeset 104568:9fc0f20ea7de
Issue #19795: Improved more markups of True/False. [#19795]
Serhiy Storchaka storchaka@gmail.com | |
---|---|
date | Wed, 19 Oct 2016 18:37:07 +0300 |
parents | 2127ef3b7660(current diff)7b143d6834cf(diff) |
children | 884c9d9159dc |
files | |
diffstat | 16 files changed, 28 insertions(+), 28 deletions(-)[+] [-] Doc/c-api/number.rst 4 Doc/library/asyncio-eventloop.rst 4 Doc/library/asyncio-task.rst 4 Doc/library/ctypes.rst 6 Doc/library/functools.rst 2 Doc/library/io.rst 2 Doc/library/logging.rst 2 Doc/library/quopri.rst 2 Doc/library/readline.rst 2 Doc/library/ssl.rst 2 Doc/library/subprocess.rst 8 Doc/library/sysconfig.rst 2 Doc/library/threading.rst 2 Doc/library/zipfile.rst 2 Doc/whatsnew/2.7.rst 10 Doc/whatsnew/3.3.rst 2 |
line wrap: on
line diff
--- a/Doc/c-api/number.rst +++ b/Doc/c-api/number.rst @@ -278,5 +278,5 @@ 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.
--- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -347,7 +347,7 @@ Creating connections * reuse_address tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to
expire. If not specified will automatically be set to True on[](#l2.7)
expire. If not specified will automatically be set to ``True`` on[](#l2.8) UNIX.[](#l2.9)
* reuse_port tells the kernel to allow this endpoint to be bound to the @@ -425,7 +425,7 @@ Creating listening connections * reuse_address tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to
expire. If not specified will automatically be set to True on[](#l2.16)
expire. If not specified will automatically be set to ``True`` on[](#l2.17) UNIX.[](#l2.18)
* reuse_port tells the kernel to allow this endpoint to be bound to the
--- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -245,7 +245,7 @@ Future .. method:: done()
Return True if the future is done.[](#l3.7)
Return ``True`` if the future is done.[](#l3.8)
Done means either that a result / exception are available, or that the future was cancelled. @@ -562,7 +562,7 @@ Task functions All futures must share the same event loop. If all the tasks are done successfully, the returned future's result is the list of results (in the order of the original sequence, not necessarily the order of results
- arrival). If return_exceptions is true, exceptions in the tasks are treated the same as successful results, and gathered in the result list; otherwise, the first raised exception will be immediately propagated to the returned future.
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -1365,7 +1365,7 @@ details, consult the :manpage:dlopen(3)[](#l4.3) ignored. On posix systems, RTLD_NOW is always added, and is not[](#l4.4) configurable.[](#l4.5) [](#l4.6) -The *use_errno* parameter, when set to True, enables a ctypes mechanism that[](#l4.7) +The *use_errno* parameter, when set to true, enables a ctypes mechanism that[](#l4.8) allows accessing the system :data:
errno error number in a safe way.[](#l4.9) :mod:
ctypes maintains a thread-local copy of the systems :data:
errno[](#l4.10) variable; if you call foreign functions created with ``use_errno=True`` then the[](#l4.11) @@ -1376,7 +1376,7 @@ The function :func:
ctypes.get_errno re[](#l4.12) copy, and the function :func:
ctypes.set_errno changes the ctypes private copy[](#l4.13) to a new value and returns the former value.[](#l4.14) [](#l4.15) -The *use_last_error* parameter, when set to True, enables the same mechanism for[](#l4.16) +The *use_last_error* parameter, when set to true, enables the same mechanism for[](#l4.17) the Windows error code which is managed by the :func:
GetLastError and[](#l4.18) :func:
SetLastError Windows API functions; :func:
ctypes.get_last_error and[](#l4.19) :func:
ctypes.set_last_error` are used to request and change the ctypes private
@@ -1586,7 +1586,7 @@ type and the argument types of the funct
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
: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.
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -56,7 +56,7 @@ The :mod:functools
module defines the
grow without bound. The LRU feature performs best when maxsize is a
power-of-two.
- If typed is set to true, function arguments of different types will be
cached separately. For example,
f(3)
andf(3.0)
will be treated as distinct calls with distinct results.
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -537,7 +537,7 @@ Raw File I/O
The name can be one of two things:
* a character string or :class:bytes
object representing the path to the
file which will be opened. In this case closefd must be True (the default)[](#l6.7)
file which will be opened. In this case closefd must be ``True`` (the default)[](#l6.8) otherwise an error will be raised.[](#l6.9)
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -318,7 +318,7 @@ is the module's name in the Python packa
looking for handlers in this logger and its parents in the logger hierarchy.
Returns True
if a handler was found, else False
. The method stops searching
up the hierarchy whenever a logger with the 'propagate' attribute set to
- false is found - that will be the last logger which is checked for the existence of handlers. .. versionadded:: 3.2
--- a/Doc/library/quopri.rst
+++ b/Doc/library/quopri.rst
@@ -52,7 +52,7 @@ sending a graphics file.
Like :func:encode
, except that it accepts a source :class:bytes
and
returns the corresponding encoded :class:bytes
. By default, it sends a
--- a/Doc/library/readline.rst
+++ b/Doc/library/readline.rst
@@ -171,7 +171,7 @@ The following functions operate on a glo
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
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -1536,7 +1536,7 @@ to speed up repeated connections from th
This setting doesn't apply to client sockets. You can also use the
:data:OP_SINGLE_ECDH_USE
option to further improve security.
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -61,16 +61,16 @@ compatibility with older versions, see t
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
used, the internal :class:
Popen
object is automatically created withstdin=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
: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,
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. @@ -259,7 +259,7 @@ default values. The arguments that are m .. index:: single: universal newlines; subprocess module
- 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
.
--- a/Doc/library/sysconfig.rst +++ b/Doc/library/sysconfig.rst @@ -152,7 +152,7 @@ identifier. Python currently uses eight 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 scheme is not an existing scheme, :func:
get_paths
will raise a :exc:KeyError
.
--- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -615,7 +615,7 @@ item to the buffer only needs to wake up .. method:: wait_for(predicate, timeout=None)
Wait until a condition evaluates to True. *predicate* should be a[](#l13.7)
Wait until a condition evaluates to true. *predicate* should be a[](#l13.8) callable which result will be interpreted as a boolean value.[](#l13.9) A *timeout* may be provided giving the maximum time to wait.[](#l13.10)
--- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -518,7 +518,7 @@ Instances have the following methods and .. method:: ZipInfo.is_dir()
- Return
True
if this archive member is a directory. This uses the entry's name: directories should always end with/
.
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -245,8 +245,8 @@ Deleting an entry and reinserting it wil
[('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)])
@@ -1518,7 +1518,7 @@ changes, or look through the Subversion
- 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, 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 @@ -1879,7 +1879,7 @@ The error messages for :meth:~unittest.[](#l15.23) :meth:
unittest.TestCase.assertTrueunittest.TestCase.assertFalse, and :meth:
[](#l15.24) failures now provide more information. If you set the[](#l15.25) :attr:
unittest.TestCase.longMessageunittest.TestCaseattribute of your :class:
classes to[](#l15.26) -True, both the standard error message and any additional message you[](#l15.27) +true, both the standard error message and any additional message you[](#l15.28) provide will be printed for failures. (Added by Michael Foord; :issue:
5663.)[](#l15.29) [](#l15.30) The :meth:
unittest.TestCase.assertRaisesunittest.mainmethod now[](#l15.31) @@ -1986,7 +1986,7 @@ GvR worked on merging them into Python's[](#l15.32) sequence comparison methods do.[](#l15.33) [](#l15.34) :func:
unittest.mainnow takes an optional ``exit`` argument. If[](#l15.35) -False, :func:
doesn't call :func:
sys.exit, allowing[](#l15.36) +false, :func:
unittest.mainunittest.maindoesn't call :func:
sys.exit, allowing[](#l15.37) :func:
to be used from the interactive interpreter.[](#l15.38) (Contributed by J. Pablo Fernández; :issue:
3379`.)
--- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -1742,7 +1742,7 @@ sched -----