Skip to content

Commit aa0735f

Browse files
oldk1331serhiy-storchaka
authored andcommitted
bpo-32747: Remove trailing spaces in docstrings. (GH-5491)
1 parent 2efb973 commit aa0735f

File tree

12 files changed

+44
-44
lines changed

12 files changed

+44
-44
lines changed

Modules/_csv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,15 +1523,15 @@ PyDoc_STRVAR(csv_module_doc,
15231523
"\n"
15241524
"SETTINGS:\n"
15251525
"\n"
1526-
" * quotechar - specifies a one-character string to use as the \n"
1526+
" * quotechar - specifies a one-character string to use as the\n"
15271527
" quoting character. It defaults to '\"'.\n"
1528-
" * delimiter - specifies a one-character string to use as the \n"
1528+
" * delimiter - specifies a one-character string to use as the\n"
15291529
" field separator. It defaults to ','.\n"
15301530
" * skipinitialspace - specifies how to interpret whitespace which\n"
15311531
" immediately follows a delimiter. It defaults to False, which\n"
15321532
" means that whitespace immediately following a delimiter is part\n"
15331533
" of the following field.\n"
1534-
" * lineterminator - specifies the character sequence which should \n"
1534+
" * lineterminator - specifies the character sequence which should\n"
15351535
" terminate rows.\n"
15361536
" * quoting - controls when quotes should be generated by the writer.\n"
15371537
" It can take on any of the following module constants:\n"
@@ -1543,7 +1543,7 @@ PyDoc_STRVAR(csv_module_doc,
15431543
" fields which do not parse as integers or floating point\n"
15441544
" numbers.\n"
15451545
" csv.QUOTE_NONE means that quotes are never placed around fields.\n"
1546-
" * escapechar - specifies a one-character string used to escape \n"
1546+
" * escapechar - specifies a one-character string used to escape\n"
15471547
" the delimiter when quoting is set to QUOTE_NONE.\n"
15481548
" * doublequote - controls the handling of quotes inside fields. When\n"
15491549
" True, two consecutive quotes are interpreted as one during read,\n"

Modules/_threadmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ PyDoc_STRVAR(_count_doc,
11621162
"_count() -> integer\n\
11631163
\n\
11641164
\
1165-
Return the number of currently running Python threads, excluding \n\
1165+
Return the number of currently running Python threads, excluding\n\
11661166
the main thread. The returned number comprises all threads created\n\
11671167
through `start_new_thread()` as well as `threading.Thread`, and not\n\
11681168
yet finished.\n\

Modules/arraymodule.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,26 +2772,26 @@ the type of objects stored in them is constrained. The type is specified\n\
27722772
at object creation time by using a type code, which is a single character.\n\
27732773
The following type codes are defined:\n\
27742774
\n\
2775-
Type code C Type Minimum size in bytes \n\
2776-
'b' signed integer 1 \n\
2777-
'B' unsigned integer 1 \n\
2778-
'u' Unicode character 2 (see note) \n\
2779-
'h' signed integer 2 \n\
2780-
'H' unsigned integer 2 \n\
2781-
'i' signed integer 2 \n\
2782-
'I' unsigned integer 2 \n\
2783-
'l' signed integer 4 \n\
2784-
'L' unsigned integer 4 \n\
2785-
'q' signed integer 8 (see note) \n\
2786-
'Q' unsigned integer 8 (see note) \n\
2787-
'f' floating point 4 \n\
2788-
'd' floating point 8 \n\
2775+
Type code C Type Minimum size in bytes\n\
2776+
'b' signed integer 1\n\
2777+
'B' unsigned integer 1\n\
2778+
'u' Unicode character 2 (see note)\n\
2779+
'h' signed integer 2\n\
2780+
'H' unsigned integer 2\n\
2781+
'i' signed integer 2\n\
2782+
'I' unsigned integer 2\n\
2783+
'l' signed integer 4\n\
2784+
'L' unsigned integer 4\n\
2785+
'q' signed integer 8 (see note)\n\
2786+
'Q' unsigned integer 8 (see note)\n\
2787+
'f' floating point 4\n\
2788+
'd' floating point 8\n\
27892789
\n\
2790-
NOTE: The 'u' typecode corresponds to Python's unicode character. On \n\
2790+
NOTE: The 'u' typecode corresponds to Python's unicode character. On\n\
27912791
narrow builds this is 2-bytes on wide builds this is 4-bytes.\n\
27922792
\n\
2793-
NOTE: The 'q' and 'Q' type codes are only available if the platform \n\
2794-
C compiler used to build Python supports 'long long', or, on Windows, \n\
2793+
NOTE: The 'q' and 'Q' type codes are only available if the platform\n\
2794+
C compiler used to build Python supports 'long long', or, on Windows,\n\
27952795
'__int64'.\n\
27962796
\n\
27972797
Methods:\n\

Modules/fcntlmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static PyMethodDef fcntl_methods[] = {
430430

431431

432432
PyDoc_STRVAR(module_doc,
433-
"This module performs file control and I/O control on file \n\
433+
"This module performs file control and I/O control on file\n\
434434
descriptors. It is an interface to the fcntl() and ioctl() Unix\n\
435435
routines. File descriptors can be obtained with the fileno() method of\n\
436436
a file or socket object.");

Modules/itertoolsmodule.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ static PyMethodDef takewhile_reduce_methods[] = {
13581358
PyDoc_STRVAR(takewhile_doc,
13591359
"takewhile(predicate, iterable) --> takewhile object\n\
13601360
\n\
1361-
Return successive entries from an iterable as long as the \n\
1361+
Return successive entries from an iterable as long as the\n\
13621362
predicate evaluates to true for each entry.");
13631363

13641364
static PyTypeObject takewhile_type = {
@@ -1616,7 +1616,7 @@ islice(iterable, start, stop[, step]) --> islice object\n\
16161616
Return an iterator whose next() method returns selected values from an\n\
16171617
iterable. If start is specified, will skip all preceding elements;\n\
16181618
otherwise, start defaults to zero. Step defaults to one. If\n\
1619-
specified as another value, step determines how many values are \n\
1619+
specified as another value, step determines how many values are\n\
16201620
skipped between successive calls. Works like a slice() on a list\n\
16211621
but returns an iterator.");
16221622

@@ -4613,8 +4613,8 @@ repeat(elem [,n]) --> elem, elem, elem, ... endlessly or up to n times\n\
46134613
\n\
46144614
Iterators terminating on the shortest input sequence:\n\
46154615
accumulate(p[, func]) --> p0, p0+p1, p0+p1+p2\n\
4616-
chain(p, q, ...) --> p0, p1, ... plast, q0, q1, ... \n\
4617-
chain.from_iterable([p, q, ...]) --> p0, p1, ... plast, q0, q1, ... \n\
4616+
chain(p, q, ...) --> p0, p1, ... plast, q0, q1, ...\n\
4617+
chain.from_iterable([p, q, ...]) --> p0, p1, ... plast, q0, q1, ...\n\
46184618
compress(data, selectors) --> (d[0] if s[0]), (d[1] if s[1]), ...\n\
46194619
dropwhile(pred, seq) --> seq[n], seq[n+1], starting when pred fails\n\
46204620
groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of keyfunc(v)\n\
@@ -4624,7 +4624,7 @@ islice(seq, [start,] stop [, step]) --> elements from\n\
46244624
starmap(fun, seq) --> fun(*seq[0]), fun(*seq[1]), ...\n\
46254625
tee(it, n=2) --> (it1, it2 , ... itn) splits one iterator into n\n\
46264626
takewhile(pred, seq) --> seq[0], seq[1], until pred fails\n\
4627-
zip_longest(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ... \n\
4627+
zip_longest(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ...\n\
46284628
\n\
46294629
Combinatoric generators:\n\
46304630
product(p, q, ... [repeat=1]) --> cartesian product\n\

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11472,7 +11472,7 @@ PyDoc_STRVAR(termsize__doc__,
1147211472
"This function will only be defined if an implementation is\n" \
1147311473
"available for this system.\n" \
1147411474
"\n" \
11475-
"shutil.get_terminal_size is the high-level function which should \n" \
11475+
"shutil.get_terminal_size is the high-level function which should\n" \
1147611476
"normally be used, os.get_terminal_size is the low-level implementation.");
1147711477

1147811478
static PyObject*

Modules/selectmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ poll_unregister(pollObject *self, PyObject *o)
516516

517517
PyDoc_STRVAR(poll_poll_doc,
518518
"poll( [timeout] ) -> list of (fd, event) 2-tuples\n\n\
519-
Polls the set of registered file descriptors, returning a list containing \n\
519+
Polls the set of registered file descriptors, returning a list containing\n\
520520
any descriptors that have events or errors to report.");
521521

522522
static PyObject *
@@ -877,7 +877,7 @@ devpoll_unregister(devpollObject *self, PyObject *o)
877877

878878
PyDoc_STRVAR(devpoll_poll_doc,
879879
"poll( [timeout] ) -> list of (fd, event) 2-tuples\n\n\
880-
Polls the set of registered file descriptors, returning a list containing \n\
880+
Polls the set of registered file descriptors, returning a list containing\n\
881881
any descriptors that have events or errors to report.");
882882

883883
static PyObject *

Modules/socketmodule.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2661,8 +2661,8 @@ sock_gettimeout(PySocketSockObject *s)
26612661
PyDoc_STRVAR(gettimeout_doc,
26622662
"gettimeout() -> timeout\n\
26632663
\n\
2664-
Returns the timeout in seconds (float) associated with socket \n\
2665-
operations. A timeout of None indicates that timeouts on socket \n\
2664+
Returns the timeout in seconds (float) associated with socket\n\
2665+
operations. A timeout of None indicates that timeouts on socket\n\
26662666
operations are disabled.");
26672667

26682668
/* s.setsockopt() method.
@@ -2752,7 +2752,7 @@ setsockopt(level, option, value: buffer)\n\
27522752
setsockopt(level, option, None, optlen: int)\n\
27532753
\n\
27542754
Set a socket option. See the Unix manual for level and option.\n\
2755-
The value argument can either be an integer, a string buffer, or \n\
2755+
The value argument can either be an integer, a string buffer, or\n\
27562756
None, optlen.");
27572757

27582758

@@ -3310,8 +3310,8 @@ sock_recv_into(PySocketSockObject *s, PyObject *args, PyObject *kwds)
33103310
PyDoc_STRVAR(recv_into_doc,
33113311
"recv_into(buffer, [nbytes[, flags]]) -> nbytes_read\n\
33123312
\n\
3313-
A version of recv() that stores its data into a buffer rather than creating \n\
3314-
a new string. Receive up to buffersize bytes from the socket. If buffersize \n\
3313+
A version of recv() that stores its data into a buffer rather than creating\n\
3314+
a new string. Receive up to buffersize bytes from the socket. If buffersize\n\
33153315
is not specified (or 0), receive up to the size available in the given buffer.\n\
33163316
\n\
33173317
See recv() for documentation about the flags.");
@@ -5772,7 +5772,7 @@ Convert a 16-bit unsigned integer from network to host byte order.\n\
57725772
Note that in case the received integer does not fit in 16-bit unsigned\n\
57735773
integer, but does fit in a positive C int, it is silently truncated to\n\
57745774
16-bit unsigned integer.\n\
5775-
However, this silent truncation feature is deprecated, and will raise an \n\
5775+
However, this silent truncation feature is deprecated, and will raise an\n\
57765776
exception in future versions of Python.");
57775777

57785778

@@ -5843,7 +5843,7 @@ Convert a 16-bit unsigned integer from host to network byte order.\n\
58435843
Note that in case the received integer does not fit in 16-bit unsigned\n\
58445844
integer, but does fit in a positive C int, it is silently truncated to\n\
58455845
16-bit unsigned integer.\n\
5846-
However, this silent truncation feature is deprecated, and will raise an \n\
5846+
However, this silent truncation feature is deprecated, and will raise an\n\
58475847
exception in future versions of Python.");
58485848

58495849

Objects/odictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ PyDoc_STRVAR(odict_delitem__doc__, "od.__delitem__(y) <==> del od[y]");
866866
/* __eq__() */
867867

868868
PyDoc_STRVAR(odict_eq__doc__,
869-
"od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive \n\
869+
"od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive\n\
870870
while comparison to a regular mapping is order-insensitive.\n\
871871
");
872872

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11595,7 +11595,7 @@ unicode_hash(PyObject *self)
1159511595
PyDoc_STRVAR(index__doc__,
1159611596
"S.index(sub[, start[, end]]) -> int\n\
1159711597
\n\
11598-
Return the lowest index in S where substring sub is found, \n\
11598+
Return the lowest index in S where substring sub is found,\n\
1159911599
such that sub is contained within S[start:end]. Optional\n\
1160011600
arguments start and end are interpreted as in slice notation.\n\
1160111601
\n\

PC/winreg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ PyDoc_STRVAR(PyHKEY_doc,
8383
"the object is destroyed. To guarantee cleanup, you can call either\n"
8484
"the Close() method on the PyHKEY, or the CloseKey() method.\n"
8585
"\n"
86-
"All functions which accept a handle object also accept an integer - \n"
86+
"All functions which accept a handle object also accept an integer --\n"
8787
"however, use of the handle object is encouraged.\n"
8888
"\n"
8989
"Functions:\n"

Python/sysmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ sys_getdefaultencoding(PyObject *self)
365365
PyDoc_STRVAR(getdefaultencoding_doc,
366366
"getdefaultencoding() -> string\n\
367367
\n\
368-
Return the current default string encoding used by the Unicode \n\
368+
Return the current default string encoding used by the Unicode\n\
369369
implementation."
370370
);
371371

@@ -1122,7 +1122,7 @@ PyDoc_STRVAR(enablelegacywindowsfsencoding_doc,
11221122
Changes the default filesystem encoding to mbcs:replace for consistency\n\
11231123
with earlier versions of Python. See PEP 529 for more information.\n\
11241124
\n\
1125-
This is equivalent to defining the PYTHONLEGACYWINDOWSFSENCODING \n\
1125+
This is equivalent to defining the PYTHONLEGACYWINDOWSFSENCODING\n\
11261126
environment variable before launching Python."
11271127
);
11281128

@@ -1812,7 +1812,7 @@ winver -- [Windows only] version number of the Python DLL\n\
18121812
#ifdef MS_WINDOWS
18131813
/* concatenating string here */
18141814
PyDoc_STR(
1815-
"_enablelegacywindowsfsencoding -- [Windows only] \n\
1815+
"_enablelegacywindowsfsencoding -- [Windows only]\n\
18161816
"
18171817
)
18181818
#endif

0 commit comments

Comments
 (0)