mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
bpo-32747: Remove trailing spaces in docstrings. (GH-5491)
This commit is contained in:
parent
2efb973589
commit
aa0735f597
|
@ -1523,15 +1523,15 @@ PyDoc_STRVAR(csv_module_doc,
|
||||||
"\n"
|
"\n"
|
||||||
"SETTINGS:\n"
|
"SETTINGS:\n"
|
||||||
"\n"
|
"\n"
|
||||||
" * quotechar - specifies a one-character string to use as the \n"
|
" * quotechar - specifies a one-character string to use as the\n"
|
||||||
" quoting character. It defaults to '\"'.\n"
|
" quoting character. It defaults to '\"'.\n"
|
||||||
" * delimiter - specifies a one-character string to use as the \n"
|
" * delimiter - specifies a one-character string to use as the\n"
|
||||||
" field separator. It defaults to ','.\n"
|
" field separator. It defaults to ','.\n"
|
||||||
" * skipinitialspace - specifies how to interpret whitespace which\n"
|
" * skipinitialspace - specifies how to interpret whitespace which\n"
|
||||||
" immediately follows a delimiter. It defaults to False, which\n"
|
" immediately follows a delimiter. It defaults to False, which\n"
|
||||||
" means that whitespace immediately following a delimiter is part\n"
|
" means that whitespace immediately following a delimiter is part\n"
|
||||||
" of the following field.\n"
|
" of the following field.\n"
|
||||||
" * lineterminator - specifies the character sequence which should \n"
|
" * lineterminator - specifies the character sequence which should\n"
|
||||||
" terminate rows.\n"
|
" terminate rows.\n"
|
||||||
" * quoting - controls when quotes should be generated by the writer.\n"
|
" * quoting - controls when quotes should be generated by the writer.\n"
|
||||||
" It can take on any of the following module constants:\n"
|
" It can take on any of the following module constants:\n"
|
||||||
|
@ -1543,7 +1543,7 @@ PyDoc_STRVAR(csv_module_doc,
|
||||||
" fields which do not parse as integers or floating point\n"
|
" fields which do not parse as integers or floating point\n"
|
||||||
" numbers.\n"
|
" numbers.\n"
|
||||||
" csv.QUOTE_NONE means that quotes are never placed around fields.\n"
|
" csv.QUOTE_NONE means that quotes are never placed around fields.\n"
|
||||||
" * escapechar - specifies a one-character string used to escape \n"
|
" * escapechar - specifies a one-character string used to escape\n"
|
||||||
" the delimiter when quoting is set to QUOTE_NONE.\n"
|
" the delimiter when quoting is set to QUOTE_NONE.\n"
|
||||||
" * doublequote - controls the handling of quotes inside fields. When\n"
|
" * doublequote - controls the handling of quotes inside fields. When\n"
|
||||||
" True, two consecutive quotes are interpreted as one during read,\n"
|
" True, two consecutive quotes are interpreted as one during read,\n"
|
||||||
|
|
|
@ -1162,7 +1162,7 @@ PyDoc_STRVAR(_count_doc,
|
||||||
"_count() -> integer\n\
|
"_count() -> integer\n\
|
||||||
\n\
|
\n\
|
||||||
\
|
\
|
||||||
Return the number of currently running Python threads, excluding \n\
|
Return the number of currently running Python threads, excluding\n\
|
||||||
the main thread. The returned number comprises all threads created\n\
|
the main thread. The returned number comprises all threads created\n\
|
||||||
through `start_new_thread()` as well as `threading.Thread`, and not\n\
|
through `start_new_thread()` as well as `threading.Thread`, and not\n\
|
||||||
yet finished.\n\
|
yet finished.\n\
|
||||||
|
|
|
@ -2772,26 +2772,26 @@ the type of objects stored in them is constrained. The type is specified\n\
|
||||||
at object creation time by using a type code, which is a single character.\n\
|
at object creation time by using a type code, which is a single character.\n\
|
||||||
The following type codes are defined:\n\
|
The following type codes are defined:\n\
|
||||||
\n\
|
\n\
|
||||||
Type code C Type Minimum size in bytes \n\
|
Type code C Type Minimum size in bytes\n\
|
||||||
'b' signed integer 1 \n\
|
'b' signed integer 1\n\
|
||||||
'B' unsigned integer 1 \n\
|
'B' unsigned integer 1\n\
|
||||||
'u' Unicode character 2 (see note) \n\
|
'u' Unicode character 2 (see note)\n\
|
||||||
'h' signed integer 2 \n\
|
'h' signed integer 2\n\
|
||||||
'H' unsigned integer 2 \n\
|
'H' unsigned integer 2\n\
|
||||||
'i' signed integer 2 \n\
|
'i' signed integer 2\n\
|
||||||
'I' unsigned integer 2 \n\
|
'I' unsigned integer 2\n\
|
||||||
'l' signed integer 4 \n\
|
'l' signed integer 4\n\
|
||||||
'L' unsigned integer 4 \n\
|
'L' unsigned integer 4\n\
|
||||||
'q' signed integer 8 (see note) \n\
|
'q' signed integer 8 (see note)\n\
|
||||||
'Q' unsigned integer 8 (see note) \n\
|
'Q' unsigned integer 8 (see note)\n\
|
||||||
'f' floating point 4 \n\
|
'f' floating point 4\n\
|
||||||
'd' floating point 8 \n\
|
'd' floating point 8\n\
|
||||||
\n\
|
\n\
|
||||||
NOTE: The 'u' typecode corresponds to Python's unicode character. On \n\
|
NOTE: The 'u' typecode corresponds to Python's unicode character. On\n\
|
||||||
narrow builds this is 2-bytes on wide builds this is 4-bytes.\n\
|
narrow builds this is 2-bytes on wide builds this is 4-bytes.\n\
|
||||||
\n\
|
\n\
|
||||||
NOTE: The 'q' and 'Q' type codes are only available if the platform \n\
|
NOTE: The 'q' and 'Q' type codes are only available if the platform\n\
|
||||||
C compiler used to build Python supports 'long long', or, on Windows, \n\
|
C compiler used to build Python supports 'long long', or, on Windows,\n\
|
||||||
'__int64'.\n\
|
'__int64'.\n\
|
||||||
\n\
|
\n\
|
||||||
Methods:\n\
|
Methods:\n\
|
||||||
|
|
|
@ -430,7 +430,7 @@ static PyMethodDef fcntl_methods[] = {
|
||||||
|
|
||||||
|
|
||||||
PyDoc_STRVAR(module_doc,
|
PyDoc_STRVAR(module_doc,
|
||||||
"This module performs file control and I/O control on file \n\
|
"This module performs file control and I/O control on file\n\
|
||||||
descriptors. It is an interface to the fcntl() and ioctl() Unix\n\
|
descriptors. It is an interface to the fcntl() and ioctl() Unix\n\
|
||||||
routines. File descriptors can be obtained with the fileno() method of\n\
|
routines. File descriptors can be obtained with the fileno() method of\n\
|
||||||
a file or socket object.");
|
a file or socket object.");
|
||||||
|
|
|
@ -1358,7 +1358,7 @@ static PyMethodDef takewhile_reduce_methods[] = {
|
||||||
PyDoc_STRVAR(takewhile_doc,
|
PyDoc_STRVAR(takewhile_doc,
|
||||||
"takewhile(predicate, iterable) --> takewhile object\n\
|
"takewhile(predicate, iterable) --> takewhile object\n\
|
||||||
\n\
|
\n\
|
||||||
Return successive entries from an iterable as long as the \n\
|
Return successive entries from an iterable as long as the\n\
|
||||||
predicate evaluates to true for each entry.");
|
predicate evaluates to true for each entry.");
|
||||||
|
|
||||||
static PyTypeObject takewhile_type = {
|
static PyTypeObject takewhile_type = {
|
||||||
|
@ -1616,7 +1616,7 @@ islice(iterable, start, stop[, step]) --> islice object\n\
|
||||||
Return an iterator whose next() method returns selected values from an\n\
|
Return an iterator whose next() method returns selected values from an\n\
|
||||||
iterable. If start is specified, will skip all preceding elements;\n\
|
iterable. If start is specified, will skip all preceding elements;\n\
|
||||||
otherwise, start defaults to zero. Step defaults to one. If\n\
|
otherwise, start defaults to zero. Step defaults to one. If\n\
|
||||||
specified as another value, step determines how many values are \n\
|
specified as another value, step determines how many values are\n\
|
||||||
skipped between successive calls. Works like a slice() on a list\n\
|
skipped between successive calls. Works like a slice() on a list\n\
|
||||||
but returns an iterator.");
|
but returns an iterator.");
|
||||||
|
|
||||||
|
@ -4613,8 +4613,8 @@ repeat(elem [,n]) --> elem, elem, elem, ... endlessly or up to n times\n\
|
||||||
\n\
|
\n\
|
||||||
Iterators terminating on the shortest input sequence:\n\
|
Iterators terminating on the shortest input sequence:\n\
|
||||||
accumulate(p[, func]) --> p0, p0+p1, p0+p1+p2\n\
|
accumulate(p[, func]) --> p0, p0+p1, p0+p1+p2\n\
|
||||||
chain(p, q, ...) --> p0, p1, ... plast, q0, q1, ... \n\
|
chain(p, q, ...) --> p0, p1, ... plast, q0, q1, ...\n\
|
||||||
chain.from_iterable([p, q, ...]) --> p0, p1, ... plast, q0, q1, ... \n\
|
chain.from_iterable([p, q, ...]) --> p0, p1, ... plast, q0, q1, ...\n\
|
||||||
compress(data, selectors) --> (d[0] if s[0]), (d[1] if s[1]), ...\n\
|
compress(data, selectors) --> (d[0] if s[0]), (d[1] if s[1]), ...\n\
|
||||||
dropwhile(pred, seq) --> seq[n], seq[n+1], starting when pred fails\n\
|
dropwhile(pred, seq) --> seq[n], seq[n+1], starting when pred fails\n\
|
||||||
groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of keyfunc(v)\n\
|
groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of keyfunc(v)\n\
|
||||||
|
@ -4624,7 +4624,7 @@ islice(seq, [start,] stop [, step]) --> elements from\n\
|
||||||
starmap(fun, seq) --> fun(*seq[0]), fun(*seq[1]), ...\n\
|
starmap(fun, seq) --> fun(*seq[0]), fun(*seq[1]), ...\n\
|
||||||
tee(it, n=2) --> (it1, it2 , ... itn) splits one iterator into n\n\
|
tee(it, n=2) --> (it1, it2 , ... itn) splits one iterator into n\n\
|
||||||
takewhile(pred, seq) --> seq[0], seq[1], until pred fails\n\
|
takewhile(pred, seq) --> seq[0], seq[1], until pred fails\n\
|
||||||
zip_longest(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ... \n\
|
zip_longest(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ...\n\
|
||||||
\n\
|
\n\
|
||||||
Combinatoric generators:\n\
|
Combinatoric generators:\n\
|
||||||
product(p, q, ... [repeat=1]) --> cartesian product\n\
|
product(p, q, ... [repeat=1]) --> cartesian product\n\
|
||||||
|
|
|
@ -11472,7 +11472,7 @@ PyDoc_STRVAR(termsize__doc__,
|
||||||
"This function will only be defined if an implementation is\n" \
|
"This function will only be defined if an implementation is\n" \
|
||||||
"available for this system.\n" \
|
"available for this system.\n" \
|
||||||
"\n" \
|
"\n" \
|
||||||
"shutil.get_terminal_size is the high-level function which should \n" \
|
"shutil.get_terminal_size is the high-level function which should\n" \
|
||||||
"normally be used, os.get_terminal_size is the low-level implementation.");
|
"normally be used, os.get_terminal_size is the low-level implementation.");
|
||||||
|
|
||||||
static PyObject*
|
static PyObject*
|
||||||
|
|
|
@ -516,7 +516,7 @@ poll_unregister(pollObject *self, PyObject *o)
|
||||||
|
|
||||||
PyDoc_STRVAR(poll_poll_doc,
|
PyDoc_STRVAR(poll_poll_doc,
|
||||||
"poll( [timeout] ) -> list of (fd, event) 2-tuples\n\n\
|
"poll( [timeout] ) -> list of (fd, event) 2-tuples\n\n\
|
||||||
Polls the set of registered file descriptors, returning a list containing \n\
|
Polls the set of registered file descriptors, returning a list containing\n\
|
||||||
any descriptors that have events or errors to report.");
|
any descriptors that have events or errors to report.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -877,7 +877,7 @@ devpoll_unregister(devpollObject *self, PyObject *o)
|
||||||
|
|
||||||
PyDoc_STRVAR(devpoll_poll_doc,
|
PyDoc_STRVAR(devpoll_poll_doc,
|
||||||
"poll( [timeout] ) -> list of (fd, event) 2-tuples\n\n\
|
"poll( [timeout] ) -> list of (fd, event) 2-tuples\n\n\
|
||||||
Polls the set of registered file descriptors, returning a list containing \n\
|
Polls the set of registered file descriptors, returning a list containing\n\
|
||||||
any descriptors that have events or errors to report.");
|
any descriptors that have events or errors to report.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
|
@ -2661,8 +2661,8 @@ sock_gettimeout(PySocketSockObject *s)
|
||||||
PyDoc_STRVAR(gettimeout_doc,
|
PyDoc_STRVAR(gettimeout_doc,
|
||||||
"gettimeout() -> timeout\n\
|
"gettimeout() -> timeout\n\
|
||||||
\n\
|
\n\
|
||||||
Returns the timeout in seconds (float) associated with socket \n\
|
Returns the timeout in seconds (float) associated with socket\n\
|
||||||
operations. A timeout of None indicates that timeouts on socket \n\
|
operations. A timeout of None indicates that timeouts on socket\n\
|
||||||
operations are disabled.");
|
operations are disabled.");
|
||||||
|
|
||||||
/* s.setsockopt() method.
|
/* s.setsockopt() method.
|
||||||
|
@ -2752,7 +2752,7 @@ setsockopt(level, option, value: buffer)\n\
|
||||||
setsockopt(level, option, None, optlen: int)\n\
|
setsockopt(level, option, None, optlen: int)\n\
|
||||||
\n\
|
\n\
|
||||||
Set a socket option. See the Unix manual for level and option.\n\
|
Set a socket option. See the Unix manual for level and option.\n\
|
||||||
The value argument can either be an integer, a string buffer, or \n\
|
The value argument can either be an integer, a string buffer, or\n\
|
||||||
None, optlen.");
|
None, optlen.");
|
||||||
|
|
||||||
|
|
||||||
|
@ -3310,8 +3310,8 @@ sock_recv_into(PySocketSockObject *s, PyObject *args, PyObject *kwds)
|
||||||
PyDoc_STRVAR(recv_into_doc,
|
PyDoc_STRVAR(recv_into_doc,
|
||||||
"recv_into(buffer, [nbytes[, flags]]) -> nbytes_read\n\
|
"recv_into(buffer, [nbytes[, flags]]) -> nbytes_read\n\
|
||||||
\n\
|
\n\
|
||||||
A version of recv() that stores its data into a buffer rather than creating \n\
|
A version of recv() that stores its data into a buffer rather than creating\n\
|
||||||
a new string. Receive up to buffersize bytes from the socket. If buffersize \n\
|
a new string. Receive up to buffersize bytes from the socket. If buffersize\n\
|
||||||
is not specified (or 0), receive up to the size available in the given buffer.\n\
|
is not specified (or 0), receive up to the size available in the given buffer.\n\
|
||||||
\n\
|
\n\
|
||||||
See recv() for documentation about the flags.");
|
See recv() for documentation about the flags.");
|
||||||
|
@ -5772,7 +5772,7 @@ Convert a 16-bit unsigned integer from network to host byte order.\n\
|
||||||
Note that in case the received integer does not fit in 16-bit unsigned\n\
|
Note that in case the received integer does not fit in 16-bit unsigned\n\
|
||||||
integer, but does fit in a positive C int, it is silently truncated to\n\
|
integer, but does fit in a positive C int, it is silently truncated to\n\
|
||||||
16-bit unsigned integer.\n\
|
16-bit unsigned integer.\n\
|
||||||
However, this silent truncation feature is deprecated, and will raise an \n\
|
However, this silent truncation feature is deprecated, and will raise an\n\
|
||||||
exception in future versions of Python.");
|
exception in future versions of Python.");
|
||||||
|
|
||||||
|
|
||||||
|
@ -5843,7 +5843,7 @@ Convert a 16-bit unsigned integer from host to network byte order.\n\
|
||||||
Note that in case the received integer does not fit in 16-bit unsigned\n\
|
Note that in case the received integer does not fit in 16-bit unsigned\n\
|
||||||
integer, but does fit in a positive C int, it is silently truncated to\n\
|
integer, but does fit in a positive C int, it is silently truncated to\n\
|
||||||
16-bit unsigned integer.\n\
|
16-bit unsigned integer.\n\
|
||||||
However, this silent truncation feature is deprecated, and will raise an \n\
|
However, this silent truncation feature is deprecated, and will raise an\n\
|
||||||
exception in future versions of Python.");
|
exception in future versions of Python.");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -866,7 +866,7 @@ PyDoc_STRVAR(odict_delitem__doc__, "od.__delitem__(y) <==> del od[y]");
|
||||||
/* __eq__() */
|
/* __eq__() */
|
||||||
|
|
||||||
PyDoc_STRVAR(odict_eq__doc__,
|
PyDoc_STRVAR(odict_eq__doc__,
|
||||||
"od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive \n\
|
"od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive\n\
|
||||||
while comparison to a regular mapping is order-insensitive.\n\
|
while comparison to a regular mapping is order-insensitive.\n\
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
|
@ -11595,7 +11595,7 @@ unicode_hash(PyObject *self)
|
||||||
PyDoc_STRVAR(index__doc__,
|
PyDoc_STRVAR(index__doc__,
|
||||||
"S.index(sub[, start[, end]]) -> int\n\
|
"S.index(sub[, start[, end]]) -> int\n\
|
||||||
\n\
|
\n\
|
||||||
Return the lowest index in S where substring sub is found, \n\
|
Return the lowest index in S where substring sub is found,\n\
|
||||||
such that sub is contained within S[start:end]. Optional\n\
|
such that sub is contained within S[start:end]. Optional\n\
|
||||||
arguments start and end are interpreted as in slice notation.\n\
|
arguments start and end are interpreted as in slice notation.\n\
|
||||||
\n\
|
\n\
|
||||||
|
|
|
@ -83,7 +83,7 @@ PyDoc_STRVAR(PyHKEY_doc,
|
||||||
"the object is destroyed. To guarantee cleanup, you can call either\n"
|
"the object is destroyed. To guarantee cleanup, you can call either\n"
|
||||||
"the Close() method on the PyHKEY, or the CloseKey() method.\n"
|
"the Close() method on the PyHKEY, or the CloseKey() method.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"All functions which accept a handle object also accept an integer - \n"
|
"All functions which accept a handle object also accept an integer --\n"
|
||||||
"however, use of the handle object is encouraged.\n"
|
"however, use of the handle object is encouraged.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Functions:\n"
|
"Functions:\n"
|
||||||
|
|
|
@ -365,7 +365,7 @@ sys_getdefaultencoding(PyObject *self)
|
||||||
PyDoc_STRVAR(getdefaultencoding_doc,
|
PyDoc_STRVAR(getdefaultencoding_doc,
|
||||||
"getdefaultencoding() -> string\n\
|
"getdefaultencoding() -> string\n\
|
||||||
\n\
|
\n\
|
||||||
Return the current default string encoding used by the Unicode \n\
|
Return the current default string encoding used by the Unicode\n\
|
||||||
implementation."
|
implementation."
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1122,7 +1122,7 @@ PyDoc_STRVAR(enablelegacywindowsfsencoding_doc,
|
||||||
Changes the default filesystem encoding to mbcs:replace for consistency\n\
|
Changes the default filesystem encoding to mbcs:replace for consistency\n\
|
||||||
with earlier versions of Python. See PEP 529 for more information.\n\
|
with earlier versions of Python. See PEP 529 for more information.\n\
|
||||||
\n\
|
\n\
|
||||||
This is equivalent to defining the PYTHONLEGACYWINDOWSFSENCODING \n\
|
This is equivalent to defining the PYTHONLEGACYWINDOWSFSENCODING\n\
|
||||||
environment variable before launching Python."
|
environment variable before launching Python."
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1812,7 +1812,7 @@ winver -- [Windows only] version number of the Python DLL\n\
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
/* concatenating string here */
|
/* concatenating string here */
|
||||||
PyDoc_STR(
|
PyDoc_STR(
|
||||||
"_enablelegacywindowsfsencoding -- [Windows only] \n\
|
"_enablelegacywindowsfsencoding -- [Windows only]\n\
|
||||||
"
|
"
|
||||||
)
|
)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue