https://github.com/python/cpython/commit/730fc6a8586218f7b00489b2f8385dcff819411e
commit: 730fc6a8586218f7b00489b2f8385dcff819411e
branch: 3.14
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-05-26T10:05:49Z
summary:
[3.14] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466)
(cherry picked from commit e1e06be11908ddb6935e8df35f972879dd1bc3d8)
files:
M Objects/bytearrayobject.c
M Objects/bytes_methods.c
M Objects/bytesobject.c
M Objects/clinic/bytearrayobject.c.h
M Objects/clinic/bytesobject.c.h
M Objects/clinic/codeobject.c.h
M Objects/clinic/floatobject.c.h
M Objects/clinic/listobject.c.h
M Objects/clinic/longobject.c.h
M Objects/clinic/memoryobject.c.h
M Objects/clinic/odictobject.c.h
M Objects/clinic/unicodeobject.c.h
M Objects/codeobject.c
M Objects/floatobject.c
M Objects/listobject.c
M Objects/longobject.c
M Objects/memoryobject.c
M Objects/odictobject.c
M Objects/sliceobject.c
M Objects/typeobject.c
M Objects/unicodeobject.c
M Python/bltinmodule.c
M Python/clinic/bltinmodule.c.h
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index a04b9176c94aedc..1209125c70bd8ed 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -1588,14 +1588,15 @@ bytearray.translate
Return a copy with each character mapped by the given translation table.
-All characters occurring in the optional argument delete are removed.
-The remaining characters are mapped through the given translation table.
+All characters occurring in the optional argument delete are
+removed. The remaining characters are mapped through the given
+translation table.
[clinic start generated code]*/
static PyObject *
bytearray_translate_impl(PyByteArrayObject *self, PyObject *table,
PyObject *deletechars)
-/*[clinic end generated code: output=b6a8f01c2a74e446 input=cd6fa93ca04e05bc]*/
+/*[clinic end generated code: output=b6a8f01c2a74e446 input=e5b770ffaf0e40eb]*/
{
char *input, *output;
const char *table_chars;
@@ -1693,15 +1694,15 @@ bytearray.maketrans
Return a translation table usable for the bytes or bytearray translate method.
-The returned table will be one where each byte in frm is mapped to the byte at
-the same position in to.
+The returned table will be one where each byte in frm is mapped to
+the byte at the same position in to.
The bytes objects frm and to must be of the same length.
[clinic start generated code]*/
static PyObject *
bytearray_maketrans_impl(Py_buffer *frm, Py_buffer *to)
-/*[clinic end generated code: output=1df267d99f56b15e input=b10de38c85950a63]*/
+/*[clinic end generated code: output=1df267d99f56b15e input=b1e7b0acbbaeb48a]*/
{
return _Py_bytes_maketrans(frm, to);
}
@@ -1740,8 +1741,8 @@ bytearray.split
sep: object = None
The delimiter according which to split the bytearray.
- None (the default value) means split on ASCII whitespace characters
- (space, tab, return, newline, formfeed, vertical tab).
+ None (the default value) means split on ASCII whitespace
+ characters (space, tab, return, newline, formfeed, vertical tab).
maxsplit: Py_ssize_t = -1
Maximum number of splits to do.
-1 (the default value) means no limit.
@@ -1752,7 +1753,7 @@ Return a list of the sections in the bytearray, using sep
as the delimiter.
static PyObject *
bytearray_split_impl(PyByteArrayObject *self, PyObject *sep,
Py_ssize_t maxsplit)
-/*[clinic end generated code: output=833e2cf385d9a04d input=1c367486b9938909]*/
+/*[clinic end generated code: output=833e2cf385d9a04d input=8776ed42f71b707f]*/
{
PyObject *list = NULL;
@@ -1792,17 +1793,18 @@ bytearray.partition
Partition the bytearray into three parts using the given separator.
-This will search for the separator sep in the bytearray. If the separator is
-found, returns a 3-tuple containing the part before the separator, the
-separator itself, and the part after it as new bytearray objects.
+This will search for the separator sep in the bytearray. If the
+separator is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it as new
+bytearray objects.
-If the separator is not found, returns a 3-tuple containing the copy of the
-original bytearray object and two empty bytearray objects.
+If the separator is not found, returns a 3-tuple containing the copy
+of the original bytearray object and two empty bytearray objects.
[clinic start generated code]*/
static PyObject *
bytearray_partition_impl(PyByteArrayObject *self, PyObject *sep)
-/*[clinic end generated code: output=b5fa1e03f10cfccb input=632855f986733f34]*/
+/*[clinic end generated code: output=b5fa1e03f10cfccb input=d76673ed03acf5dd]*/
{
PyObject *bytesep, *result;
@@ -1830,18 +1832,19 @@ bytearray.rpartition
Partition the bytearray into three parts using the given separator.
-This will search for the separator sep in the bytearray, starting at the end.
-If the separator is found, returns a 3-tuple containing the part before the
-separator, the separator itself, and the part after it as new bytearray
-objects.
+This will search for the separator sep in the bytearray, starting at
+the end. If the separator is found, returns a 3-tuple containing
+the part before the separator, the separator itself, and the part
+after it as new bytearray objects.
-If the separator is not found, returns a 3-tuple containing two empty bytearray
-objects and the copy of the original bytearray object.
+If the separator is not found, returns a 3-tuple containing two
+empty bytearray objects and the copy of the original bytearray
+object.
[clinic start generated code]*/
static PyObject *
bytearray_rpartition_impl(PyByteArrayObject *self, PyObject *sep)
-/*[clinic end generated code: output=0186ce7b1ef61289 input=4318e3d125497450]*/
+/*[clinic end generated code: output=0186ce7b1ef61289 input=b9216a2074174a36]*/
{
PyObject *bytesep, *result;
@@ -1866,13 +1869,14 @@ bytearray.rsplit = bytearray.split
Return a list of the sections in the bytearray, using sep as the delimiter.
-Splitting is done starting at the end of the bytearray and working to the
front.
+Splitting is done starting at the end of the bytearray and working
+to the front.
[clinic start generated code]*/
static PyObject *
bytearray_rsplit_impl(PyByteArrayObject *self, PyObject *sep,
Py_ssize_t maxsplit)
-/*[clinic end generated code: output=a55e0b5a03cb6190 input=3cd513c2b94a53c1]*/
+/*[clinic end generated code: output=a55e0b5a03cb6190 input=c12efb1a77e16c90]*/
{
PyObject *list = NULL;
@@ -2360,12 +2364,13 @@ bytearray.strip
Strip leading and trailing bytes contained in the argument.
-If the argument is omitted or None, strip leading and trailing ASCII
whitespace.
+If the argument is omitted or None, strip leading and trailing ASCII
+whitespace.
[clinic start generated code]*/
static PyObject *
bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes)
-/*[clinic end generated code: output=760412661a34ad5a input=1f9026e5ad35388a]*/
+/*[clinic end generated code: output=760412661a34ad5a input=f4ec5fa609df7d14]*/
{
return bytearray_strip_impl_helper(self, bytes, BOTHSTRIP);
}
@@ -2465,11 +2470,11 @@ bytearray.decode
encoding: str(c_default="NULL") = 'utf-8'
The encoding with which to decode the bytearray.
errors: str(c_default="NULL") = 'strict'
- The error handling scheme to use for the handling of decoding errors.
- The default is 'strict' meaning that decoding errors raise a
- UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
- as well as any other name registered with codecs.register_error that
- can handle UnicodeDecodeErrors.
+ The error handling scheme to use for the handling of decoding
+ errors. The default is 'strict' meaning that decoding errors
+ raise a UnicodeDecodeError. Other possible values are 'ignore'
+ and 'replace' as well as any other name registered with
+ codecs.register_error that can handle UnicodeDecodeErrors.
Decode the bytearray using the codec registered for encoding.
[clinic start generated code]*/
@@ -2477,7 +2482,7 @@ Decode the bytearray using the codec registered for
encoding.
static PyObject *
bytearray_decode_impl(PyByteArrayObject *self, const char *encoding,
const char *errors)
-/*[clinic end generated code: output=f57d43f4a00b42c5 input=86c303ee376b8453]*/
+/*[clinic end generated code: output=f57d43f4a00b42c5 input=e51ce9b82b51e2ca]*/
{
if (encoding == NULL)
encoding = PyUnicode_GetDefaultEncoding();
@@ -2505,14 +2510,15 @@ bytearray.join
Concatenate any number of bytes/bytearray objects.
-The bytearray whose method is called is inserted in between each pair.
+The bytearray whose method is called is inserted in between each
+pair.
The result is returned as a new bytearray object.
[clinic start generated code]*/
static PyObject *
bytearray_join_impl(PyByteArrayObject *self, PyObject *iterable_of_bytes)
-/*[clinic end generated code: output=0ced382b5846a7ee input=49627e07ca31ca26]*/
+/*[clinic end generated code: output=0ced382b5846a7ee input=0a31db349efcd7fa]*/
{
PyObject *ret;
self->ob_exports++; // this protects `self` from being cleared/resized if
`iterable_of_bytes` is a custom iterator
@@ -2549,13 +2555,13 @@ bytearray.splitlines
Return a list of the lines in the bytearray, breaking at line boundaries.
-Line breaks are not included in the resulting list unless keepends is given and
-true.
+Line breaks are not included in the resulting list unless keepends
+is given and true.
[clinic start generated code]*/
static PyObject *
bytearray_splitlines_impl(PyByteArrayObject *self, int keepends)
-/*[clinic end generated code: output=4223c94b895f6ad9 input=874cd662866a66a1]*/
+/*[clinic end generated code: output=4223c94b895f6ad9 input=73512aabe215e0ec]*/
{
return stringlib_splitlines(
(PyObject*) self, PyByteArray_AS_STRING(self),
@@ -2573,12 +2579,13 @@ bytearray.fromhex
Create a bytearray object from a string of hexadecimal numbers.
Spaces between two numbers are accepted.
-Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef')
+Example:
+ bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef')
[clinic start generated code]*/
static PyObject *
bytearray_fromhex_impl(PyTypeObject *type, PyObject *string)
-/*[clinic end generated code: output=8f0f0b6d30fb3ba0 input=7e314e5b2d7ab484]*/
+/*[clinic end generated code: output=8f0f0b6d30fb3ba0 input=2243a8b0b9e66cd5]*/
{
PyObject *result = _PyBytes_FromHex(string, type == &PyByteArray_Type);
if (type != &PyByteArray_Type && result != NULL) {
@@ -2594,8 +2601,8 @@ bytearray.hex
sep: object = NULL
An optional single character or byte to separate hex bytes.
bytes_per_sep: int = 1
- How many bytes between separators. Positive values count from the
- right, negative values count from the left.
+ How many bytes between separators. Positive values count from
+ the right, negative values count from the left.
Create a string of hexadecimal numbers from a bytearray object.
@@ -2613,7 +2620,7 @@ Create a string of hexadecimal numbers from a bytearray
object.
static PyObject *
bytearray_hex_impl(PyByteArrayObject *self, PyObject *sep, int bytes_per_sep)
-/*[clinic end generated code: output=29c4e5ef72c565a0 input=7784107de7048873]*/
+/*[clinic end generated code: output=29c4e5ef72c565a0 input=88d6628560fdd413]*/
{
char* argbuf = PyByteArray_AS_STRING(self);
Py_ssize_t arglen = PyByteArray_GET_SIZE(self);
diff --git a/Objects/bytes_methods.c b/Objects/bytes_methods.c
index c239ae18a593e3c..c9849c8ec4dad09 100644
--- a/Objects/bytes_methods.c
+++ b/Objects/bytes_methods.c
@@ -277,8 +277,8 @@ _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t
len)
PyDoc_STRVAR_shared(_Py_title__doc__,
"B.title() -> copy of B\n\
\n\
-Return a titlecased version of B, i.e. ASCII words start with uppercase\n\
-characters, all remaining cased characters have lowercase.");
+Return a titlecased version of B, i.e. ASCII words start with\n\
+uppercase characters, all remaining cased characters have lowercase.");
void
_Py_bytes_title(char *result, const char *s, Py_ssize_t len)
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 765589d679cce3b..03245788bb10403 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -1756,8 +1756,8 @@ bytes.split
sep: object = None
The delimiter according which to split the bytes.
- None (the default value) means split on ASCII whitespace characters
- (space, tab, return, newline, formfeed, vertical tab).
+ None (the default value) means split on ASCII whitespace
+ characters (space, tab, return, newline, formfeed, vertical tab).
maxsplit: Py_ssize_t = -1
Maximum number of splits to do.
-1 (the default value) means no limit.
@@ -1767,7 +1767,7 @@ Return a list of the sections in the bytes, using sep as
the delimiter.
static PyObject *
bytes_split_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit)
-/*[clinic end generated code: output=52126b5844c1d8ef input=8b809b39074abbfa]*/
+/*[clinic end generated code: output=52126b5844c1d8ef input=9c0faeffc870f672]*/
{
Py_ssize_t len = PyBytes_GET_SIZE(self), n;
const char *s = PyBytes_AS_STRING(self), *sub;
@@ -1796,17 +1796,17 @@ bytes.partition
Partition the bytes into three parts using the given separator.
-This will search for the separator sep in the bytes. If the separator is found,
-returns a 3-tuple containing the part before the separator, the separator
-itself, and the part after it.
+This will search for the separator sep in the bytes. If the
+separator is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it.
-If the separator is not found, returns a 3-tuple containing the original bytes
-object and two empty bytes objects.
+If the separator is not found, returns a 3-tuple containing the
+original bytes object and two empty bytes objects.
[clinic start generated code]*/
static PyObject *
bytes_partition_impl(PyBytesObject *self, Py_buffer *sep)
-/*[clinic end generated code: output=f532b392a17ff695 input=61cca95519406099]*/
+/*[clinic end generated code: output=f532b392a17ff695 input=2e6e551ea4f8b95a]*/
{
return stringlib_partition(
(PyObject*) self,
@@ -1823,17 +1823,18 @@ bytes.rpartition
Partition the bytes into three parts using the given separator.
-This will search for the separator sep in the bytes, starting at the end. If
-the separator is found, returns a 3-tuple containing the part before the
-separator, the separator itself, and the part after it.
+This will search for the separator sep in the bytes, starting at the
+end. If the separator is found, returns a 3-tuple containing the
+part before the separator, the separator itself, and the part after
+it.
-If the separator is not found, returns a 3-tuple containing two empty bytes
-objects and the original bytes object.
+If the separator is not found, returns a 3-tuple containing two
+empty bytes objects and the original bytes object.
[clinic start generated code]*/
static PyObject *
bytes_rpartition_impl(PyBytesObject *self, Py_buffer *sep)
-/*[clinic end generated code: output=191b114cbb028e50 input=d78db010c8cfdbe1]*/
+/*[clinic end generated code: output=191b114cbb028e50 input=f7d24f722a5470a4]*/
{
return stringlib_rpartition(
(PyObject*) self,
@@ -1847,12 +1848,13 @@ bytes.rsplit = bytes.split
Return a list of the sections in the bytes, using sep as the delimiter.
-Splitting is done starting at the end of the bytes and working to the front.
+Splitting is done starting at the end of the bytes and working to
+the front.
[clinic start generated code]*/
static PyObject *
bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit)
-/*[clinic end generated code: output=ba698d9ea01e1c8f input=0f86c9f28f7d7b7b]*/
+/*[clinic end generated code: output=ba698d9ea01e1c8f input=7fd643d4337b6a9b]*/
{
Py_ssize_t len = PyBytes_GET_SIZE(self), n;
const char *s = PyBytes_AS_STRING(self), *sub;
@@ -2075,12 +2077,13 @@ bytes.strip
Strip leading and trailing bytes contained in the argument.
-If the argument is omitted or None, strip leading and trailing ASCII
whitespace.
+If the argument is omitted or None, strip leading and trailing ASCII
+whitespace.
[clinic start generated code]*/
static PyObject *
bytes_strip_impl(PyBytesObject *self, PyObject *bytes)
-/*[clinic end generated code: output=c7c228d3bd104a1b input=8a354640e4e0b3ef]*/
+/*[clinic end generated code: output=c7c228d3bd104a1b input=9ffea5f752032bd0]*/
{
return do_argstrip(self, BOTHSTRIP, bytes);
}
@@ -2148,14 +2151,15 @@ bytes.translate
Return a copy with each character mapped by the given translation table.
-All characters occurring in the optional argument delete are removed.
-The remaining characters are mapped through the given translation table.
+All characters occurring in the optional argument delete are
+removed. The remaining characters are mapped through the given
+translation table.
[clinic start generated code]*/
static PyObject *
bytes_translate_impl(PyBytesObject *self, PyObject *table,
PyObject *deletechars)
-/*[clinic end generated code: output=43be3437f1956211 input=0ecdf159f654233c]*/
+/*[clinic end generated code: output=43be3437f1956211 input=4e4460a981d768c5]*/
{
const char *input;
char *output;
@@ -2277,15 +2281,15 @@ bytes.maketrans
Return a translation table usable for the bytes or bytearray translate method.
-The returned table will be one where each byte in frm is mapped to the byte at
-the same position in to.
+The returned table will be one where each byte in frm is mapped to
+the byte at the same position in to.
The bytes objects frm and to must be of the same length.
[clinic start generated code]*/
static PyObject *
bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to)
-/*[clinic end generated code: output=a36f6399d4b77f6f input=a3bd00d430a0979f]*/
+/*[clinic end generated code: output=a36f6399d4b77f6f input=c88bcc17621f785d]*/
{
return _Py_bytes_maketrans(frm, to);
}
@@ -2327,13 +2331,14 @@ bytes.removeprefix as bytes_removeprefix
Return a bytes object with the given prefix string removed if present.
-If the bytes starts with the prefix string, return bytes[len(prefix):].
-Otherwise, return a copy of the original bytes.
+If the bytes starts with the prefix string, return
+bytes[len(prefix):]. Otherwise, return a copy of the original
+bytes.
[clinic start generated code]*/
static PyObject *
bytes_removeprefix_impl(PyBytesObject *self, Py_buffer *prefix)
-/*[clinic end generated code: output=f006865331a06ab6 input=0c93bac817a8502c]*/
+/*[clinic end generated code: output=f006865331a06ab6 input=8f371f9421b8addd]*/
{
const char *self_start = PyBytes_AS_STRING(self);
Py_ssize_t self_len = PyBytes_GET_SIZE(self);
@@ -2363,14 +2368,14 @@ bytes.removesuffix as bytes_removesuffix
Return a bytes object with the given suffix string removed if present.
-If the bytes ends with the suffix string and that suffix is not empty,
-return bytes[:-len(prefix)]. Otherwise, return a copy of the original
-bytes.
+If the bytes ends with the suffix string and that suffix is not
+empty, return bytes[:-len(prefix)]. Otherwise, return a copy of the
+original bytes.
[clinic start generated code]*/
static PyObject *
bytes_removesuffix_impl(PyBytesObject *self, Py_buffer *suffix)
-/*[clinic end generated code: output=d887d308e3242eeb input=9f4e1da8c637bbf1]*/
+/*[clinic end generated code: output=d887d308e3242eeb input=35eada0260d1171b]*/
{
const char *self_start = PyBytes_AS_STRING(self);
Py_ssize_t self_len = PyBytes_GET_SIZE(self);
@@ -2448,11 +2453,11 @@ bytes.decode
encoding: str(c_default="NULL") = 'utf-8'
The encoding with which to decode the bytes.
errors: str(c_default="NULL") = 'strict'
- The error handling scheme to use for the handling of decoding errors.
- The default is 'strict' meaning that decoding errors raise a
- UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
- as well as any other name registered with codecs.register_error that
- can handle UnicodeDecodeErrors.
+ The error handling scheme to use for the handling of decoding
+ errors. The default is 'strict' meaning that decoding errors
+ raise a UnicodeDecodeError. Other possible values are 'ignore'
+ and 'replace' as well as any other name registered with
+ codecs.register_error that can handle UnicodeDecodeErrors.
Decode the bytes using the codec registered for encoding.
[clinic start generated code]*/
@@ -2460,7 +2465,7 @@ Decode the bytes using the codec registered for encoding.
static PyObject *
bytes_decode_impl(PyBytesObject *self, const char *encoding,
const char *errors)
-/*[clinic end generated code: output=5649a53dde27b314 input=958174769d2a40ca]*/
+/*[clinic end generated code: output=5649a53dde27b314 input=94e9b8524f1d7f37]*/
{
return PyUnicode_FromEncodedObject((PyObject*)self, encoding, errors);
}
@@ -2473,13 +2478,13 @@ bytes.splitlines
Return a list of the lines in the bytes, breaking at line boundaries.
-Line breaks are not included in the resulting list unless keepends is given and
-true.
+Line breaks are not included in the resulting list unless keepends
+is given and true.
[clinic start generated code]*/
static PyObject *
bytes_splitlines_impl(PyBytesObject *self, int keepends)
-/*[clinic end generated code: output=3484149a5d880ffb input=5d7b898af2fe55c0]*/
+/*[clinic end generated code: output=3484149a5d880ffb input=8b7b6915be775bcf]*/
{
return stringlib_splitlines(
(PyObject*) self, PyBytes_AS_STRING(self),
@@ -2627,9 +2632,10 @@ bytes.hex
sep: object = NULL
An optional single character or byte to separate hex bytes.
+
bytes_per_sep: int = 1
- How many bytes between separators. Positive values count from the
- right, negative values count from the left.
+ How many bytes between separators. Positive values count from
+ the right, negative values count from the left.
Create a string of hexadecimal numbers from a bytes object.
@@ -2647,7 +2653,7 @@ Create a string of hexadecimal numbers from a bytes
object.
static PyObject *
bytes_hex_impl(PyBytesObject *self, PyObject *sep, int bytes_per_sep)
-/*[clinic end generated code: output=1f134da504064139 input=1a21282b1f1ae595]*/
+/*[clinic end generated code: output=1f134da504064139 input=67d7bb5f70f0d6f2]*/
{
const char *argbuf = PyBytes_AS_STRING(self);
Py_ssize_t arglen = PyBytes_GET_SIZE(self);
diff --git a/Objects/clinic/bytearrayobject.c.h
b/Objects/clinic/bytearrayobject.c.h
index 58920a4d353c6b0..dd64b9eae41e723 100644
--- a/Objects/clinic/bytearrayobject.c.h
+++ b/Objects/clinic/bytearrayobject.c.h
@@ -642,8 +642,9 @@ PyDoc_STRVAR(bytearray_translate__doc__,
" table\n"
" Translation table, which must be a bytes object of length 256.\n"
"\n"
-"All characters occurring in the optional argument delete are removed.\n"
-"The remaining characters are mapped through the given translation table.");
+"All characters occurring in the optional argument delete are\n"
+"removed. The remaining characters are mapped through the given\n"
+"translation table.");
#define BYTEARRAY_TRANSLATE_METHODDEF \
{"translate", _PyCFunction_CAST(bytearray_translate),
METH_FASTCALL|METH_KEYWORDS, bytearray_translate__doc__},
@@ -713,8 +714,8 @@ PyDoc_STRVAR(bytearray_maketrans__doc__,
"\n"
"Return a translation table usable for the bytes or bytearray translate
method.\n"
"\n"
-"The returned table will be one where each byte in frm is mapped to the byte
at\n"
-"the same position in to.\n"
+"The returned table will be one where each byte in frm is mapped to\n"
+"the byte at the same position in to.\n"
"\n"
"The bytes objects frm and to must be of the same length.");
@@ -833,8 +834,8 @@ PyDoc_STRVAR(bytearray_split__doc__,
"\n"
" sep\n"
" The delimiter according which to split the bytearray.\n"
-" None (the default value) means split on ASCII whitespace characters\n"
-" (space, tab, return, newline, formfeed, vertical tab).\n"
+" None (the default value) means split on ASCII whitespace\n"
+" characters (space, tab, return, newline, formfeed, vertical tab).\n"
" maxsplit\n"
" Maximum number of splits to do.\n"
" -1 (the default value) means no limit.");
@@ -923,12 +924,13 @@ PyDoc_STRVAR(bytearray_partition__doc__,
"\n"
"Partition the bytearray into three parts using the given separator.\n"
"\n"
-"This will search for the separator sep in the bytearray. If the separator
is\n"
-"found, returns a 3-tuple containing the part before the separator, the\n"
-"separator itself, and the part after it as new bytearray objects.\n"
+"This will search for the separator sep in the bytearray. If the\n"
+"separator is found, returns a 3-tuple containing the part before the\n"
+"separator, the separator itself, and the part after it as new\n"
+"bytearray objects.\n"
"\n"
-"If the separator is not found, returns a 3-tuple containing the copy of the\n"
-"original bytearray object and two empty bytearray objects.");
+"If the separator is not found, returns a 3-tuple containing the copy\n"
+"of the original bytearray object and two empty bytearray objects.");
#define BYTEARRAY_PARTITION_METHODDEF \
{"partition", (PyCFunction)bytearray_partition, METH_O,
bytearray_partition__doc__},
@@ -954,13 +956,14 @@ PyDoc_STRVAR(bytearray_rpartition__doc__,
"\n"
"Partition the bytearray into three parts using the given separator.\n"
"\n"
-"This will search for the separator sep in the bytearray, starting at the
end.\n"
-"If the separator is found, returns a 3-tuple containing the part before the\n"
-"separator, the separator itself, and the part after it as new bytearray\n"
-"objects.\n"
+"This will search for the separator sep in the bytearray, starting at\n"
+"the end. If the separator is found, returns a 3-tuple containing\n"
+"the part before the separator, the separator itself, and the part\n"
+"after it as new bytearray objects.\n"
"\n"
-"If the separator is not found, returns a 3-tuple containing two empty
bytearray\n"
-"objects and the copy of the original bytearray object.");
+"If the separator is not found, returns a 3-tuple containing two\n"
+"empty bytearray objects and the copy of the original bytearray\n"
+"object.");
#define BYTEARRAY_RPARTITION_METHODDEF \
{"rpartition", (PyCFunction)bytearray_rpartition, METH_O,
bytearray_rpartition__doc__},
@@ -988,13 +991,14 @@ PyDoc_STRVAR(bytearray_rsplit__doc__,
"\n"
" sep\n"
" The delimiter according which to split the bytearray.\n"
-" None (the default value) means split on ASCII whitespace characters\n"
-" (space, tab, return, newline, formfeed, vertical tab).\n"
+" None (the default value) means split on ASCII whitespace\n"
+" characters (space, tab, return, newline, formfeed, vertical tab).\n"
" maxsplit\n"
" Maximum number of splits to do.\n"
" -1 (the default value) means no limit.\n"
"\n"
-"Splitting is done starting at the end of the bytearray and working to the
front.");
+"Splitting is done starting at the end of the bytearray and working\n"
+"to the front.");
#define BYTEARRAY_RSPLIT_METHODDEF \
{"rsplit", _PyCFunction_CAST(bytearray_rsplit),
METH_FASTCALL|METH_KEYWORDS, bytearray_rsplit__doc__},
@@ -1296,7 +1300,8 @@ PyDoc_STRVAR(bytearray_strip__doc__,
"\n"
"Strip leading and trailing bytes contained in the argument.\n"
"\n"
-"If the argument is omitted or None, strip leading and trailing ASCII
whitespace.");
+"If the argument is omitted or None, strip leading and trailing ASCII\n"
+"whitespace.");
#define BYTEARRAY_STRIP_METHODDEF \
{"strip", _PyCFunction_CAST(bytearray_strip), METH_FASTCALL,
bytearray_strip__doc__},
@@ -1407,11 +1412,11 @@ PyDoc_STRVAR(bytearray_decode__doc__,
" encoding\n"
" The encoding with which to decode the bytearray.\n"
" errors\n"
-" The error handling scheme to use for the handling of decoding errors.\n"
-" The default is \'strict\' meaning that decoding errors raise a\n"
-" UnicodeDecodeError. Other possible values are \'ignore\' and
\'replace\'\n"
-" as well as any other name registered with codecs.register_error that\n"
-" can handle UnicodeDecodeErrors.");
+" The error handling scheme to use for the handling of decoding\n"
+" errors. The default is \'strict\' meaning that decoding errors\n"
+" raise a UnicodeDecodeError. Other possible values are \'ignore\'\n"
+" and \'replace\' as well as any other name registered with\n"
+" codecs.register_error that can handle UnicodeDecodeErrors.");
#define BYTEARRAY_DECODE_METHODDEF \
{"decode", _PyCFunction_CAST(bytearray_decode),
METH_FASTCALL|METH_KEYWORDS, bytearray_decode__doc__},
@@ -1510,7 +1515,8 @@ PyDoc_STRVAR(bytearray_join__doc__,
"\n"
"Concatenate any number of bytes/bytearray objects.\n"
"\n"
-"The bytearray whose method is called is inserted in between each pair.\n"
+"The bytearray whose method is called is inserted in between each\n"
+"pair.\n"
"\n"
"The result is returned as a new bytearray object.");
@@ -1538,8 +1544,8 @@ PyDoc_STRVAR(bytearray_splitlines__doc__,
"\n"
"Return a list of the lines in the bytearray, breaking at line boundaries.\n"
"\n"
-"Line breaks are not included in the resulting list unless keepends is given
and\n"
-"true.");
+"Line breaks are not included in the resulting list unless keepends\n"
+"is given and true.");
#define BYTEARRAY_SPLITLINES_METHODDEF \
{"splitlines", _PyCFunction_CAST(bytearray_splitlines),
METH_FASTCALL|METH_KEYWORDS, bytearray_splitlines__doc__},
@@ -1610,7 +1616,8 @@ PyDoc_STRVAR(bytearray_fromhex__doc__,
"Create a bytearray object from a string of hexadecimal numbers.\n"
"\n"
"Spaces between two numbers are accepted.\n"
-"Example: bytearray.fromhex(\'B9 01EF\') ->
bytearray(b\'\\\\xb9\\\\x01\\\\xef\')");
+"Example:\n"
+" bytearray.fromhex(\'B9 01EF\') -> bytearray(b\'\\\\xb9\\\\x01\\\\xef\')");
#define BYTEARRAY_FROMHEX_METHODDEF \
{"fromhex", (PyCFunction)bytearray_fromhex, METH_O|METH_CLASS,
bytearray_fromhex__doc__},
@@ -1637,8 +1644,8 @@ PyDoc_STRVAR(bytearray_hex__doc__,
" sep\n"
" An optional single character or byte to separate hex bytes.\n"
" bytes_per_sep\n"
-" How many bytes between separators. Positive values count from the\n"
-" right, negative values count from the left.\n"
+" How many bytes between separators. Positive values count from\n"
+" the right, negative values count from the left.\n"
"\n"
"Example:\n"
">>> value = bytearray([0xb9, 0x01, 0xef])\n"
@@ -1798,4 +1805,4 @@ bytearray_sizeof(PyObject *self, PyObject
*Py_UNUSED(ignored))
{
return bytearray_sizeof_impl((PyByteArrayObject *)self);
}
-/*[clinic end generated code: output=bca62cf335d48127 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d13c01fc42a84ff5 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h
index 00cf13d422d900d..986cc87c8df2a19 100644
--- a/Objects/clinic/bytesobject.c.h
+++ b/Objects/clinic/bytesobject.c.h
@@ -35,8 +35,8 @@ PyDoc_STRVAR(bytes_split__doc__,
"\n"
" sep\n"
" The delimiter according which to split the bytes.\n"
-" None (the default value) means split on ASCII whitespace characters\n"
-" (space, tab, return, newline, formfeed, vertical tab).\n"
+" None (the default value) means split on ASCII whitespace\n"
+" characters (space, tab, return, newline, formfeed, vertical tab).\n"
" maxsplit\n"
" Maximum number of splits to do.\n"
" -1 (the default value) means no limit.");
@@ -122,12 +122,12 @@ PyDoc_STRVAR(bytes_partition__doc__,
"\n"
"Partition the bytes into three parts using the given separator.\n"
"\n"
-"This will search for the separator sep in the bytes. If the separator is
found,\n"
-"returns a 3-tuple containing the part before the separator, the separator\n"
-"itself, and the part after it.\n"
+"This will search for the separator sep in the bytes. If the\n"
+"separator is found, returns a 3-tuple containing the part before the\n"
+"separator, the separator itself, and the part after it.\n"
"\n"
-"If the separator is not found, returns a 3-tuple containing the original
bytes\n"
-"object and two empty bytes objects.");
+"If the separator is not found, returns a 3-tuple containing the\n"
+"original bytes object and two empty bytes objects.");
#define BYTES_PARTITION_METHODDEF \
{"partition", (PyCFunction)bytes_partition, METH_O,
bytes_partition__doc__},
@@ -161,12 +161,13 @@ PyDoc_STRVAR(bytes_rpartition__doc__,
"\n"
"Partition the bytes into three parts using the given separator.\n"
"\n"
-"This will search for the separator sep in the bytes, starting at the end.
If\n"
-"the separator is found, returns a 3-tuple containing the part before the\n"
-"separator, the separator itself, and the part after it.\n"
+"This will search for the separator sep in the bytes, starting at the\n"
+"end. If the separator is found, returns a 3-tuple containing the\n"
+"part before the separator, the separator itself, and the part after\n"
+"it.\n"
"\n"
-"If the separator is not found, returns a 3-tuple containing two empty bytes\n"
-"objects and the original bytes object.");
+"If the separator is not found, returns a 3-tuple containing two\n"
+"empty bytes objects and the original bytes object.");
#define BYTES_RPARTITION_METHODDEF \
{"rpartition", (PyCFunction)bytes_rpartition, METH_O,
bytes_rpartition__doc__},
@@ -202,13 +203,14 @@ PyDoc_STRVAR(bytes_rsplit__doc__,
"\n"
" sep\n"
" The delimiter according which to split the bytes.\n"
-" None (the default value) means split on ASCII whitespace characters\n"
-" (space, tab, return, newline, formfeed, vertical tab).\n"
+" None (the default value) means split on ASCII whitespace\n"
+" characters (space, tab, return, newline, formfeed, vertical tab).\n"
" maxsplit\n"
" Maximum number of splits to do.\n"
" -1 (the default value) means no limit.\n"
"\n"
-"Splitting is done starting at the end of the bytes and working to the
front.");
+"Splitting is done starting at the end of the bytes and working to\n"
+"the front.");
#define BYTES_RSPLIT_METHODDEF \
{"rsplit", _PyCFunction_CAST(bytes_rsplit), METH_FASTCALL|METH_KEYWORDS,
bytes_rsplit__doc__},
@@ -523,7 +525,8 @@ PyDoc_STRVAR(bytes_strip__doc__,
"\n"
"Strip leading and trailing bytes contained in the argument.\n"
"\n"
-"If the argument is omitted or None, strip leading and trailing ASCII
whitespace.");
+"If the argument is omitted or None, strip leading and trailing ASCII\n"
+"whitespace.");
#define BYTES_STRIP_METHODDEF \
{"strip", _PyCFunction_CAST(bytes_strip), METH_FASTCALL,
bytes_strip__doc__},
@@ -677,8 +680,9 @@ PyDoc_STRVAR(bytes_translate__doc__,
" table\n"
" Translation table, which must be a bytes object of length 256.\n"
"\n"
-"All characters occurring in the optional argument delete are removed.\n"
-"The remaining characters are mapped through the given translation table.");
+"All characters occurring in the optional argument delete are\n"
+"removed. The remaining characters are mapped through the given\n"
+"translation table.");
#define BYTES_TRANSLATE_METHODDEF \
{"translate", _PyCFunction_CAST(bytes_translate),
METH_FASTCALL|METH_KEYWORDS, bytes_translate__doc__},
@@ -746,8 +750,8 @@ PyDoc_STRVAR(bytes_maketrans__doc__,
"\n"
"Return a translation table usable for the bytes or bytearray translate
method.\n"
"\n"
-"The returned table will be one where each byte in frm is mapped to the byte
at\n"
-"the same position in to.\n"
+"The returned table will be one where each byte in frm is mapped to\n"
+"the byte at the same position in to.\n"
"\n"
"The bytes objects frm and to must be of the same length.");
@@ -862,8 +866,9 @@ PyDoc_STRVAR(bytes_removeprefix__doc__,
"\n"
"Return a bytes object with the given prefix string removed if present.\n"
"\n"
-"If the bytes starts with the prefix string, return bytes[len(prefix):].\n"
-"Otherwise, return a copy of the original bytes.");
+"If the bytes starts with the prefix string, return\n"
+"bytes[len(prefix):]. Otherwise, return a copy of the original\n"
+"bytes.");
#define BYTES_REMOVEPREFIX_METHODDEF \
{"removeprefix", (PyCFunction)bytes_removeprefix, METH_O,
bytes_removeprefix__doc__},
@@ -897,9 +902,9 @@ PyDoc_STRVAR(bytes_removesuffix__doc__,
"\n"
"Return a bytes object with the given suffix string removed if present.\n"
"\n"
-"If the bytes ends with the suffix string and that suffix is not empty,\n"
-"return bytes[:-len(prefix)]. Otherwise, return a copy of the original\n"
-"bytes.");
+"If the bytes ends with the suffix string and that suffix is not\n"
+"empty, return bytes[:-len(prefix)]. Otherwise, return a copy of the\n"
+"original bytes.");
#define BYTES_REMOVESUFFIX_METHODDEF \
{"removesuffix", (PyCFunction)bytes_removesuffix, METH_O,
bytes_removesuffix__doc__},
@@ -1038,11 +1043,11 @@ PyDoc_STRVAR(bytes_decode__doc__,
" encoding\n"
" The encoding with which to decode the bytes.\n"
" errors\n"
-" The error handling scheme to use for the handling of decoding errors.\n"
-" The default is \'strict\' meaning that decoding errors raise a\n"
-" UnicodeDecodeError. Other possible values are \'ignore\' and
\'replace\'\n"
-" as well as any other name registered with codecs.register_error that\n"
-" can handle UnicodeDecodeErrors.");
+" The error handling scheme to use for the handling of decoding\n"
+" errors. The default is \'strict\' meaning that decoding errors\n"
+" raise a UnicodeDecodeError. Other possible values are \'ignore\'\n"
+" and \'replace\' as well as any other name registered with\n"
+" codecs.register_error that can handle UnicodeDecodeErrors.");
#define BYTES_DECODE_METHODDEF \
{"decode", _PyCFunction_CAST(bytes_decode), METH_FASTCALL|METH_KEYWORDS,
bytes_decode__doc__},
@@ -1139,8 +1144,8 @@ PyDoc_STRVAR(bytes_splitlines__doc__,
"\n"
"Return a list of the lines in the bytes, breaking at line boundaries.\n"
"\n"
-"Line breaks are not included in the resulting list unless keepends is given
and\n"
-"true.");
+"Line breaks are not included in the resulting list unless keepends\n"
+"is given and true.");
#define BYTES_SPLITLINES_METHODDEF \
{"splitlines", _PyCFunction_CAST(bytes_splitlines),
METH_FASTCALL|METH_KEYWORDS, bytes_splitlines__doc__},
@@ -1236,8 +1241,8 @@ PyDoc_STRVAR(bytes_hex__doc__,
" sep\n"
" An optional single character or byte to separate hex bytes.\n"
" bytes_per_sep\n"
-" How many bytes between separators. Positive values count from the\n"
-" right, negative values count from the left.\n"
+" How many bytes between separators. Positive values count from\n"
+" the right, negative values count from the left.\n"
"\n"
"Example:\n"
">>> value = b\'\\xb9\\x01\\xef\'\n"
@@ -1411,4 +1416,4 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject
*kwargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=08b9507244f73638 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=f2845457d3d7b36e input=a9049054013a1b77]*/
diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h
index 0cd6e0b56620e85..88333e9d3363eb4 100644
--- a/Objects/clinic/codeobject.c.h
+++ b/Objects/clinic/codeobject.c.h
@@ -414,7 +414,8 @@ PyDoc_STRVAR(code__varname_from_oparg__doc__,
"\n"
"(internal-only) Return the local variable name for the given oparg.\n"
"\n"
-"WARNING: this method is for internal use only and may change or go away.");
+"WARNING: this method is for internal use only and may change or go\n"
+"away.");
#define CODE__VARNAME_FROM_OPARG_METHODDEF \
{"_varname_from_oparg", _PyCFunction_CAST(code__varname_from_oparg),
METH_FASTCALL|METH_KEYWORDS, code__varname_from_oparg__doc__},
@@ -470,4 +471,4 @@ code__varname_from_oparg(PyObject *self, PyObject *const
*args, Py_ssize_t nargs
exit:
return return_value;
}
-/*[clinic end generated code: output=c5c6e40fc357defe input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5c22e29e430401b4 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/floatobject.c.h b/Objects/clinic/floatobject.c.h
index 4051131f480ccb6..f62dc94594930f4 100644
--- a/Objects/clinic/floatobject.c.h
+++ b/Objects/clinic/floatobject.c.h
@@ -290,9 +290,9 @@ PyDoc_STRVAR(float___getformat____doc__,
"\n"
"It exists mainly to be used in Python\'s test suite.\n"
"\n"
-"This function returns whichever of \'unknown\', \'IEEE, big-endian\' or
\'IEEE,\n"
-"little-endian\' best describes the format of floating-point numbers used by
the\n"
-"C type named by typestr.");
+"This function returns whichever of \'unknown\', \'IEEE, big-endian\' or\n"
+"\'IEEE, little-endian\' best describes the format of floating-point\n"
+"numbers used by the C type named by typestr.");
#define FLOAT___GETFORMAT___METHODDEF \
{"__getformat__", (PyCFunction)float___getformat__, METH_O|METH_CLASS,
float___getformat____doc__},
@@ -353,4 +353,4 @@ float___format__(PyObject *self, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=927035897ea3573f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=cb5263e0ed588ac7 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h
index 26ba5b954336da5..f3821ef5f70c21c 100644
--- a/Objects/clinic/listobject.c.h
+++ b/Objects/clinic/listobject.c.h
@@ -200,11 +200,11 @@ PyDoc_STRVAR(list_sort__doc__,
"\n"
"Sort the list in ascending order and return None.\n"
"\n"
-"The sort is in-place (i.e. the list itself is modified) and stable (i.e.
the\n"
-"order of two equal elements is maintained).\n"
+"The sort is in-place (i.e. the list itself is modified) and stable\n"
+"(i.e. the order of two equal elements is maintained).\n"
"\n"
-"If a key function is given, apply it once to each list item and sort them,\n"
-"ascending or descending, according to their function values.\n"
+"If a key function is given, apply it once to each list item and sort\n"
+"them, ascending or descending, according to their function values.\n"
"\n"
"The reverse flag can be set to sort in descending order.");
@@ -468,4 +468,4 @@ list___reversed__(PyObject *self, PyObject
*Py_UNUSED(ignored))
{
return list___reversed___impl((PyListObject *)self);
}
-/*[clinic end generated code: output=ae13fc2b56dc27c2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=06c21b0bffbe8d84 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h
index a236a32c091c4c6..cfdcfd77ab1760c 100644
--- a/Objects/clinic/longobject.c.h
+++ b/Objects/clinic/longobject.c.h
@@ -262,19 +262,20 @@ PyDoc_STRVAR(int_to_bytes__doc__,
"Return an array of bytes representing an integer.\n"
"\n"
" length\n"
-" Length of bytes object to use. An OverflowError is raised if the\n"
-" integer is not representable with the given number of bytes. Default\n"
-" is length 1.\n"
+" Length of bytes object to use. An OverflowError is raised if\n"
+" the integer is not representable with the given number of bytes.\n"
+" Default is length 1.\n"
" byteorder\n"
-" The byte order used to represent the integer. If byteorder is \'big\',\n"
-" the most significant byte is at the beginning of the byte array. If\n"
-" byteorder is \'little\', the most significant byte is at the end of the\n"
-" byte array. To request the native byte order of the host system, use\n"
-" sys.byteorder as the byte order value. Default is to use \'big\'.\n"
+" The byte order used to represent the integer. If byteorder is\n"
+" \'big\', the most significant byte is at the beginning of the byte\n"
+" array. If byteorder is \'little\', the most significant byte is at\n"
+" the end of the byte array. To request the native byte order of\n"
+" the host system, use sys.byteorder as the byte order value.\n"
+" Default is to use \'big\'.\n"
" signed\n"
-" Determines whether two\'s complement is used to represent the integer.\n"
-" If signed is False and a negative integer is given, an OverflowError\n"
-" is raised.");
+" Determines whether two\'s complement is used to represent the\n"
+" integer. If signed is False and a negative integer is given,\n"
+" an OverflowError is raised.");
#define INT_TO_BYTES_METHODDEF \
{"to_bytes", _PyCFunction_CAST(int_to_bytes), METH_FASTCALL|METH_KEYWORDS,
int_to_bytes__doc__},
@@ -378,17 +379,19 @@ PyDoc_STRVAR(int_from_bytes__doc__,
"\n"
" bytes\n"
" Holds the array of bytes to convert. The argument must either\n"
-" support the buffer protocol or be an iterable object producing bytes.\n"
-" Bytes and bytearray are examples of built-in objects that support the\n"
-" buffer protocol.\n"
+" support the buffer protocol or be an iterable object producing\n"
+" bytes. Bytes and bytearray are examples of built-in objects that\n"
+" support the buffer protocol.\n"
" byteorder\n"
-" The byte order used to represent the integer. If byteorder is \'big\',\n"
-" the most significant byte is at the beginning of the byte array. If\n"
-" byteorder is \'little\', the most significant byte is at the end of the\n"
-" byte array. To request the native byte order of the host system, use\n"
-" sys.byteorder as the byte order value. Default is to use \'big\'.\n"
+" The byte order used to represent the integer. If byteorder is\n"
+" \'big\', the most significant byte is at the beginning of the byte\n"
+" array. If byteorder is \'little\', the most significant byte is at\n"
+" the end of the byte array. To request the native byte order of\n"
+" the host system, use sys.byteorder as the byte order value.\n"
+" Default is to use \'big\'.\n"
" signed\n"
-" Indicates whether two\'s complement is used to represent the integer.");
+" Indicates whether two\'s complement is used to represent the\n"
+" integer.");
#define INT_FROM_BYTES_METHODDEF \
{"from_bytes", _PyCFunction_CAST(int_from_bytes),
METH_FASTCALL|METH_KEYWORDS|METH_CLASS, int_from_bytes__doc__},
@@ -485,4 +488,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return int_is_integer_impl(self);
}
-/*[clinic end generated code: output=d23f8ce5bdf08a30 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=93d4c37f650e1a65 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h
index 28cfd1a22080c9b..f2e66563722e3f8 100644
--- a/Objects/clinic/memoryobject.c.h
+++ b/Objects/clinic/memoryobject.c.h
@@ -258,11 +258,12 @@ PyDoc_STRVAR(memoryview_tobytes__doc__,
"\n"
"Return the data in the buffer as a byte string.\n"
"\n"
-"Order can be {\'C\', \'F\', \'A\'}. When order is \'C\' or \'F\', the data of
the\n"
-"original array is converted to C or Fortran order. For contiguous views,\n"
-"\'A\' returns an exact copy of the physical memory. In particular,
in-memory\n"
-"Fortran order is preserved. For non-contiguous views, the data is converted\n"
-"to C first. order=None is the same as order=\'C\'.");
+"Order can be {\'C\', \'F\', \'A\'}. When order is \'C\' or \'F\', the data
of\n"
+"the original array is converted to C or Fortran order. For\n"
+"contiguous views, \'A\' returns an exact copy of the physical memory.\n"
+"In particular, in-memory Fortran order is preserved. For\n"
+"non-contiguous views, the data is converted to C first. order=None\n"
+"is the same as order=\'C\'.");
#define MEMORYVIEW_TOBYTES_METHODDEF \
{"tobytes", _PyCFunction_CAST(memoryview_tobytes),
METH_FASTCALL|METH_KEYWORDS, memoryview_tobytes__doc__},
@@ -347,8 +348,8 @@ PyDoc_STRVAR(memoryview_hex__doc__,
" sep\n"
" An optional single character or byte to separate hex bytes.\n"
" bytes_per_sep\n"
-" How many bytes between separators. Positive values count from the\n"
-" right, negative values count from the left.\n"
+" How many bytes between separators. Positive values count from\n"
+" the right, negative values count from the left.\n"
"\n"
"Example:\n"
">>> value = memoryview(b\'\\xb9\\x01\\xef\')\n"
@@ -496,4 +497,4 @@ memoryview_index(PyObject *self, PyObject *const *args,
Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=154f4c04263ccb24 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=6d0886bee65a8f9f input=a9049054013a1b77]*/
diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h
index 894e9be91bbdce9..92129e6444810f4 100644
--- a/Objects/clinic/odictobject.c.h
+++ b/Objects/clinic/odictobject.c.h
@@ -268,7 +268,8 @@ PyDoc_STRVAR(OrderedDict_popitem__doc__,
"\n"
"Remove and return a (key, value) pair from the dictionary.\n"
"\n"
-"Pairs are returned in LIFO order if last is true or FIFO order if false.");
+"Pairs are returned in LIFO order if last is true or FIFO order if\n"
+"false.");
#define ORDEREDDICT_POPITEM_METHODDEF \
{"popitem", _PyCFunction_CAST(OrderedDict_popitem),
METH_FASTCALL|METH_KEYWORDS, OrderedDict_popitem__doc__},
@@ -451,4 +452,4 @@ OrderedDict_move_to_end(PyObject *self, PyObject *const
*args, Py_ssize_t nargs,
exit:
return return_value;
}
-/*[clinic end generated code: output=7bc997ca7900f06f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=89f7e92de998f9a4 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h
index 1819fbaea220a32..0e06406cf8369d1 100644
--- a/Objects/clinic/unicodeobject.c.h
+++ b/Objects/clinic/unicodeobject.c.h
@@ -33,8 +33,8 @@ PyDoc_STRVAR(unicode_title__doc__,
"\n"
"Return a version of the string where each word is titlecased.\n"
"\n"
-"More specifically, words start with uppercased characters and all remaining\n"
-"cased characters have lower case.");
+"More specifically, words start with uppercased characters and all\n"
+"remaining cased characters have lower case.");
#define UNICODE_TITLE_METHODDEF \
{"title", (PyCFunction)unicode_title, METH_NOARGS, unicode_title__doc__},
@@ -54,8 +54,8 @@ PyDoc_STRVAR(unicode_capitalize__doc__,
"\n"
"Return a capitalized version of the string.\n"
"\n"
-"More specifically, make the first character have upper case and the rest
lower\n"
-"case.");
+"More specifically, make the first character have upper case and the\n"
+"rest lower case.");
#define UNICODE_CAPITALIZE_METHODDEF \
{"capitalize", (PyCFunction)unicode_capitalize, METH_NOARGS,
unicode_capitalize__doc__},
@@ -93,7 +93,8 @@ PyDoc_STRVAR(unicode_center__doc__,
"\n"
"Return a centered string of length width.\n"
"\n"
-"Padding is done using the specified fill character (default is a space).");
+"Padding is done using the specified fill character (default is\n"
+"a space).");
#define UNICODE_CENTER_METHODDEF \
{"center", _PyCFunction_CAST(unicode_center), METH_FASTCALL,
unicode_center__doc__},
@@ -142,7 +143,8 @@ PyDoc_STRVAR(unicode_count__doc__,
"\n"
"Return the number of non-overlapping occurrences of substring sub in string
S[start:end].\n"
"\n"
-"Optional arguments start and end are interpreted as in slice notation.");
+"Optional arguments start and end are interpreted as in slice\n"
+"notation.");
#define UNICODE_COUNT_METHODDEF \
{"count", _PyCFunction_CAST(unicode_count), METH_FASTCALL,
unicode_count__doc__},
@@ -202,8 +204,8 @@ PyDoc_STRVAR(unicode_encode__doc__,
" errors\n"
" The error handling scheme to use for encoding errors.\n"
" The default is \'strict\' meaning that encoding errors raise a\n"
-" UnicodeEncodeError. Other possible values are \'ignore\', \'replace\'
and\n"
-" \'xmlcharrefreplace\' as well as any other name registered with\n"
+" UnicodeEncodeError. Other possible values are \'ignore\', \'replace\'\n"
+" and \'xmlcharrefreplace\' as well as any other name registered with\n"
" codecs.register_error that can handle UnicodeEncodeErrors.");
#define UNICODE_ENCODE_METHODDEF \
@@ -368,8 +370,8 @@ PyDoc_STRVAR(unicode_find__doc__,
"\n"
"Return the lowest index in S where substring sub is found, such that sub is
contained within S[start:end].\n"
"\n"
-"Optional arguments start and end are interpreted as in slice notation.\n"
-"Return -1 on failure.");
+"Optional arguments start and end are interpreted as in slice\n"
+"notation. Return -1 on failure.");
#define UNICODE_FIND_METHODDEF \
{"find", _PyCFunction_CAST(unicode_find), METH_FASTCALL,
unicode_find__doc__},
@@ -424,8 +426,8 @@ PyDoc_STRVAR(unicode_index__doc__,
"\n"
"Return the lowest index in S where substring sub is found, such that sub is
contained within S[start:end].\n"
"\n"
-"Optional arguments start and end are interpreted as in slice notation.\n"
-"Raises ValueError when the substring is not found.");
+"Optional arguments start and end are interpreted as in slice\n"
+"notation. Raises ValueError when the substring is not found.");
#define UNICODE_INDEX_METHODDEF \
{"index", _PyCFunction_CAST(unicode_index), METH_FASTCALL,
unicode_index__doc__},
@@ -501,8 +503,8 @@ PyDoc_STRVAR(unicode_islower__doc__,
"\n"
"Return True if the string is a lowercase string, False otherwise.\n"
"\n"
-"A string is lowercase if all cased characters in the string are lowercase
and\n"
-"there is at least one cased character in the string.");
+"A string is lowercase if all cased characters in the string are\n"
+"lowercase and there is at least one cased character in the string.");
#define UNICODE_ISLOWER_METHODDEF \
{"islower", (PyCFunction)unicode_islower, METH_NOARGS,
unicode_islower__doc__},
@@ -522,8 +524,8 @@ PyDoc_STRVAR(unicode_isupper__doc__,
"\n"
"Return True if the string is an uppercase string, False otherwise.\n"
"\n"
-"A string is uppercase if all cased characters in the string are uppercase
and\n"
-"there is at least one cased character in the string.");
+"A string is uppercase if all cased characters in the string are\n"
+"uppercase and there is at least one cased character in the string.");
#define UNICODE_ISUPPER_METHODDEF \
{"isupper", (PyCFunction)unicode_isupper, METH_NOARGS,
unicode_isupper__doc__},
@@ -564,8 +566,8 @@ PyDoc_STRVAR(unicode_isspace__doc__,
"\n"
"Return True if the string is a whitespace string, False otherwise.\n"
"\n"
-"A string is whitespace if all characters in the string are whitespace and
there\n"
-"is at least one character in the string.");
+"A string is whitespace if all characters in the string are\n"
+"whitespace and there is at least one character in the string.");
#define UNICODE_ISSPACE_METHODDEF \
{"isspace", (PyCFunction)unicode_isspace, METH_NOARGS,
unicode_isspace__doc__},
@@ -585,8 +587,8 @@ PyDoc_STRVAR(unicode_isalpha__doc__,
"\n"
"Return True if the string is an alphabetic string, False otherwise.\n"
"\n"
-"A string is alphabetic if all characters in the string are alphabetic and
there\n"
-"is at least one character in the string.");
+"A string is alphabetic if all characters in the string are\n"
+"alphabetic and there is at least one character in the string.");
#define UNICODE_ISALPHA_METHODDEF \
{"isalpha", (PyCFunction)unicode_isalpha, METH_NOARGS,
unicode_isalpha__doc__},
@@ -606,8 +608,8 @@ PyDoc_STRVAR(unicode_isalnum__doc__,
"\n"
"Return True if the string is an alpha-numeric string, False otherwise.\n"
"\n"
-"A string is alpha-numeric if all characters in the string are alpha-numeric
and\n"
-"there is at least one character in the string.");
+"A string is alpha-numeric if all characters in the string are\n"
+"alpha-numeric and there is at least one character in the string.");
#define UNICODE_ISALNUM_METHODDEF \
{"isalnum", (PyCFunction)unicode_isalnum, METH_NOARGS,
unicode_isalnum__doc__},
@@ -627,8 +629,8 @@ PyDoc_STRVAR(unicode_isdecimal__doc__,
"\n"
"Return True if the string is a decimal string, False otherwise.\n"
"\n"
-"A string is a decimal string if all characters in the string are decimal
and\n"
-"there is at least one character in the string.");
+"A string is a decimal string if all characters in the string are\n"
+"decimal and there is at least one character in the string.");
#define UNICODE_ISDECIMAL_METHODDEF \
{"isdecimal", (PyCFunction)unicode_isdecimal, METH_NOARGS,
unicode_isdecimal__doc__},
@@ -648,8 +650,8 @@ PyDoc_STRVAR(unicode_isdigit__doc__,
"\n"
"Return True if the string is a digit string, False otherwise.\n"
"\n"
-"A string is a digit string if all characters in the string are digits and
there\n"
-"is at least one character in the string.");
+"A string is a digit string if all characters in the string are\n"
+"digits and there is at least one character in the string.");
#define UNICODE_ISDIGIT_METHODDEF \
{"isdigit", (PyCFunction)unicode_isdigit, METH_NOARGS,
unicode_isdigit__doc__},
@@ -669,8 +671,8 @@ PyDoc_STRVAR(unicode_isnumeric__doc__,
"\n"
"Return True if the string is a numeric string, False otherwise.\n"
"\n"
-"A string is numeric if all characters in the string are numeric and there is
at\n"
-"least one character in the string.");
+"A string is numeric if all characters in the string are numeric and\n"
+"there is at least one character in the string.");
#define UNICODE_ISNUMERIC_METHODDEF \
{"isnumeric", (PyCFunction)unicode_isnumeric, METH_NOARGS,
unicode_isnumeric__doc__},
@@ -690,8 +692,8 @@ PyDoc_STRVAR(unicode_isidentifier__doc__,
"\n"
"Return True if the string is a valid Python identifier, False otherwise.\n"
"\n"
-"Call keyword.iskeyword(s) to test whether string s is a reserved
identifier,\n"
-"such as \"def\" or \"class\".");
+"Call keyword.iskeyword(s) to test whether string s is a reserved\n"
+"identifier, such as \"def\" or \"class\".");
#define UNICODE_ISIDENTIFIER_METHODDEF \
{"isidentifier", (PyCFunction)unicode_isidentifier, METH_NOARGS,
unicode_isidentifier__doc__},
@@ -731,8 +733,8 @@ PyDoc_STRVAR(unicode_join__doc__,
"\n"
"Concatenate any number of strings.\n"
"\n"
-"The string whose method is called is inserted in between each given string.\n"
-"The result is returned as a new string.\n"
+"The string whose method is called is inserted in between each given\n"
+"string. The result is returned as a new string.\n"
"\n"
"Example: \'.\'.join([\'ab\', \'pq\', \'rs\']) -> \'ab.pq.rs\'");
@@ -745,7 +747,8 @@ PyDoc_STRVAR(unicode_ljust__doc__,
"\n"
"Return a left-justified string of length width.\n"
"\n"
-"Padding is done using the specified fill character (default is a space).");
+"Padding is done using the specified fill character (default is\n"
+"a space).");
#define UNICODE_LJUST_METHODDEF \
{"ljust", _PyCFunction_CAST(unicode_ljust), METH_FASTCALL,
unicode_ljust__doc__},
@@ -1008,8 +1011,9 @@ PyDoc_STRVAR(unicode_removeprefix__doc__,
"\n"
"Return a str with the given prefix string removed if present.\n"
"\n"
-"If the string starts with the prefix string, return string[len(prefix):].\n"
-"Otherwise, return a copy of the original string.");
+"If the string starts with the prefix string, return\n"
+"string[len(prefix):]. Otherwise, return a copy of the original\n"
+"string.");
#define UNICODE_REMOVEPREFIX_METHODDEF \
{"removeprefix", (PyCFunction)unicode_removeprefix, METH_O,
unicode_removeprefix__doc__},
@@ -1040,9 +1044,9 @@ PyDoc_STRVAR(unicode_removesuffix__doc__,
"\n"
"Return a str with the given suffix string removed if present.\n"
"\n"
-"If the string ends with the suffix string and that suffix is not empty,\n"
-"return string[:-len(suffix)]. Otherwise, return a copy of the original\n"
-"string.");
+"If the string ends with the suffix string and that suffix is not\n"
+"empty, return string[:-len(suffix)]. Otherwise, return a copy of\n"
+"the original string.");
#define UNICODE_REMOVESUFFIX_METHODDEF \
{"removesuffix", (PyCFunction)unicode_removesuffix, METH_O,
unicode_removesuffix__doc__},
@@ -1073,8 +1077,8 @@ PyDoc_STRVAR(unicode_rfind__doc__,
"\n"
"Return the highest index in S where substring sub is found, such that sub is
contained within S[start:end].\n"
"\n"
-"Optional arguments start and end are interpreted as in slice notation.\n"
-"Return -1 on failure.");
+"Optional arguments start and end are interpreted as in slice\n"
+"notation. Return -1 on failure.");
#define UNICODE_RFIND_METHODDEF \
{"rfind", _PyCFunction_CAST(unicode_rfind), METH_FASTCALL,
unicode_rfind__doc__},
@@ -1129,8 +1133,8 @@ PyDoc_STRVAR(unicode_rindex__doc__,
"\n"
"Return the highest index in S where substring sub is found, such that sub is
contained within S[start:end].\n"
"\n"
-"Optional arguments start and end are interpreted as in slice notation.\n"
-"Raises ValueError when the substring is not found.");
+"Optional arguments start and end are interpreted as in slice\n"
+"notation. Raises ValueError when the substring is not found.");
#define UNICODE_RINDEX_METHODDEF \
{"rindex", _PyCFunction_CAST(unicode_rindex), METH_FASTCALL,
unicode_rindex__doc__},
@@ -1185,7 +1189,8 @@ PyDoc_STRVAR(unicode_rjust__doc__,
"\n"
"Return a right-justified string of length width.\n"
"\n"
-"Padding is done using the specified fill character (default is a space).");
+"Padding is done using the specified fill character (default is\n"
+"a space).");
#define UNICODE_RJUST_METHODDEF \
{"rjust", _PyCFunction_CAST(unicode_rjust), METH_FASTCALL,
unicode_rjust__doc__},
@@ -1237,18 +1242,18 @@ PyDoc_STRVAR(unicode_split__doc__,
" sep\n"
" The separator used to split the string.\n"
"\n"
-" When set to None (the default value), will split on any whitespace\n"
-" character (including \\n \\r \\t \\f and spaces) and will discard\n"
-" empty strings from the result.\n"
+" When set to None (the default value), will split on any\n"
+" whitespace character (including \\n \\r \\t \\f and spaces) and\n"
+" will discard empty strings from the result.\n"
" maxsplit\n"
" Maximum number of splits.\n"
" -1 (the default value) means no limit.\n"
"\n"
"Splitting starts at the front of the string and works to the end.\n"
"\n"
-"Note, str.split() is mainly useful for data that has been intentionally\n"
-"delimited. With natural text that includes punctuation, consider using\n"
-"the regular expression module.");
+"Note, str.split() is mainly useful for data that has been\n"
+"intentionally delimited. With natural text that includes\n"
+"punctuation, consider using the regular expression module.");
#define UNICODE_SPLIT_METHODDEF \
{"split", _PyCFunction_CAST(unicode_split), METH_FASTCALL|METH_KEYWORDS,
unicode_split__doc__},
@@ -1331,12 +1336,12 @@ PyDoc_STRVAR(unicode_partition__doc__,
"\n"
"Partition the string into three parts using the given separator.\n"
"\n"
-"This will search for the separator in the string. If the separator is
found,\n"
-"returns a 3-tuple containing the part before the separator, the separator\n"
-"itself, and the part after it.\n"
+"This will search for the separator in the string. If the separator\n"
+"is found, returns a 3-tuple containing the part before the\n"
+"separator, the separator itself, and the part after it.\n"
"\n"
-"If the separator is not found, returns a 3-tuple containing the original
string\n"
-"and two empty strings.");
+"If the separator is not found, returns a 3-tuple containing\n"
+"the original string and two empty strings.");
#define UNICODE_PARTITION_METHODDEF \
{"partition", (PyCFunction)unicode_partition, METH_O,
unicode_partition__doc__},
@@ -1347,12 +1352,13 @@ PyDoc_STRVAR(unicode_rpartition__doc__,
"\n"
"Partition the string into three parts using the given separator.\n"
"\n"
-"This will search for the separator in the string, starting at the end. If\n"
-"the separator is found, returns a 3-tuple containing the part before the\n"
-"separator, the separator itself, and the part after it.\n"
+"This will search for the separator in the string, starting at the\n"
+"end. If the separator is found, returns a 3-tuple containing the\n"
+"part before the separator, the separator itself, and the part after\n"
+"it.\n"
"\n"
-"If the separator is not found, returns a 3-tuple containing two empty
strings\n"
-"and the original string.");
+"If the separator is not found, returns a 3-tuple containing two\n"
+"empty strings and the original string.");
#define UNICODE_RPARTITION_METHODDEF \
{"rpartition", (PyCFunction)unicode_rpartition, METH_O,
unicode_rpartition__doc__},
@@ -1366,9 +1372,9 @@ PyDoc_STRVAR(unicode_rsplit__doc__,
" sep\n"
" The separator used to split the string.\n"
"\n"
-" When set to None (the default value), will split on any whitespace\n"
-" character (including \\n \\r \\t \\f and spaces) and will discard\n"
-" empty strings from the result.\n"
+" When set to None (the default value), will split on any\n"
+" whitespace character (including \\n \\r \\t \\f and spaces) and\n"
+" will discard empty strings from the result.\n"
" maxsplit\n"
" Maximum number of splits.\n"
" -1 (the default value) means no limit.\n"
@@ -1456,8 +1462,8 @@ PyDoc_STRVAR(unicode_splitlines__doc__,
"\n"
"Return a list of the lines in the string, breaking at line boundaries.\n"
"\n"
-"Line breaks are not included in the resulting list unless keepends is given
and\n"
-"true.");
+"Line breaks are not included in the resulting list unless keepends\n"
+"is given and true.");
#define UNICODE_SPLITLINES_METHODDEF \
{"splitlines", _PyCFunction_CAST(unicode_splitlines),
METH_FASTCALL|METH_KEYWORDS, unicode_splitlines__doc__},
@@ -1543,13 +1549,14 @@ PyDoc_STRVAR(unicode_maketrans__doc__,
"\n"
"Return a translation table usable for str.translate().\n"
"\n"
-"If there is only one argument, it must be a dictionary mapping Unicode\n"
-"ordinals (integers) or characters to Unicode ordinals, strings or None.\n"
-"Character keys will be then converted to ordinals.\n"
-"If there are two arguments, they must be strings of equal length, and\n"
-"in the resulting dictionary, each character in x will be mapped to the\n"
-"character at the same position in y. If there is a third argument, it\n"
-"must be a string, whose characters will be mapped to None in the result.");
+"If there is only one argument, it must be a dictionary mapping\n"
+"Unicode ordinals (integers) or characters to Unicode ordinals,\n"
+"strings or None. Character keys will be then converted to ordinals.\n"
+"If there are two arguments, they must be strings of equal length,\n"
+"and in the resulting dictionary, each character in x will be mapped\n"
+"to the character at the same position in y. If there is a third\n"
+"argument, it must be a string, whose characters will be mapped to\n"
+"None in the result.");
#define UNICODE_MAKETRANS_METHODDEF \
{"maketrans", _PyCFunction_CAST(unicode_maketrans),
METH_FASTCALL|METH_STATIC, unicode_maketrans__doc__},
@@ -1599,12 +1606,13 @@ PyDoc_STRVAR(unicode_translate__doc__,
"Replace each character in the string using the given translation table.\n"
"\n"
" table\n"
-" Translation table, which must be a mapping of Unicode ordinals to\n"
-" Unicode ordinals, strings, or None.\n"
+" Translation table, which must be a mapping of Unicode ordinals\n"
+" to Unicode ordinals, strings, or None.\n"
"\n"
-"The table must implement lookup/indexing via __getitem__, for instance a\n"
-"dictionary or list. If this operation raises LookupError, the character is\n"
-"left untouched. Characters mapped to None are deleted.");
+"The table must implement lookup/indexing via __getitem__, for\n"
+"instance a dictionary or list. If this operation raises\n"
+"LookupError, the character is left untouched. Characters mapped to\n"
+"None are deleted.");
#define UNICODE_TRANSLATE_METHODDEF \
{"translate", (PyCFunction)unicode_translate, METH_O,
unicode_translate__doc__},
@@ -1908,4 +1916,4 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject
*kwargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=238917fe66120bde input=a9049054013a1b77]*/
+/*[clinic end generated code: output=6c3a5d1565fad1d6 input=a9049054013a1b77]*/
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index acaa9f5501af12f..66af1f1e160c84c 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -2948,12 +2948,13 @@ code._varname_from_oparg
(internal-only) Return the local variable name for the given oparg.
-WARNING: this method is for internal use only and may change or go away.
+WARNING: this method is for internal use only and may change or go
+away.
[clinic start generated code]*/
static PyObject *
code__varname_from_oparg_impl(PyCodeObject *self, int oparg)
-/*[clinic end generated code: output=1fd1130413184206 input=c5fa3ee9bac7d4ca]*/
+/*[clinic end generated code: output=1fd1130413184206 input=6ba7d6df0d566463]*/
{
PyObject *name = PyTuple_GetItem(self->co_localsplusnames, oparg);
if (name == NULL) {
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 1b0469675299346..a9d521634a62dfa 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1698,14 +1698,14 @@ You probably don't want to use this function.
It exists mainly to be used in Python's test suite.
-This function returns whichever of 'unknown', 'IEEE, big-endian' or 'IEEE,
-little-endian' best describes the format of floating-point numbers used by the
-C type named by typestr.
+This function returns whichever of 'unknown', 'IEEE, big-endian' or
+'IEEE, little-endian' best describes the format of floating-point
+numbers used by the C type named by typestr.
[clinic start generated code]*/
static PyObject *
float___getformat___impl(PyTypeObject *type, const char *typestr)
-/*[clinic end generated code: output=2bfb987228cc9628 input=90d5e246409a246e]*/
+/*[clinic end generated code: output=2bfb987228cc9628 input=933cc4bdcf8fa8d3]*/
{
float_format_type r;
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 6407d0ac5833fe0..d73b73a01e4a3b9 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2887,18 +2887,18 @@ list.sort
Sort the list in ascending order and return None.
-The sort is in-place (i.e. the list itself is modified) and stable (i.e. the
-order of two equal elements is maintained).
+The sort is in-place (i.e. the list itself is modified) and stable
+(i.e. the order of two equal elements is maintained).
-If a key function is given, apply it once to each list item and sort them,
-ascending or descending, according to their function values.
+If a key function is given, apply it once to each list item and sort
+them, ascending or descending, according to their function values.
The reverse flag can be set to sort in descending order.
[clinic start generated code]*/
static PyObject *
list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse)
-/*[clinic end generated code: output=57b9f9c5e23fbe42 input=667bf25d0e3a3676]*/
+/*[clinic end generated code: output=57b9f9c5e23fbe42 input=c145526281e1fb9f]*/
{
MergeState ms;
Py_ssize_t nremaining;
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 85e97861a05eefe..0143e7fbfa7dfd5 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -6277,20 +6277,21 @@ int_as_integer_ratio_impl(PyObject *self)
int.to_bytes
length: Py_ssize_t = 1
- Length of bytes object to use. An OverflowError is raised if the
- integer is not representable with the given number of bytes. Default
- is length 1.
+ Length of bytes object to use. An OverflowError is raised if
+ the integer is not representable with the given number of bytes.
+ Default is length 1.
byteorder: unicode(c_default="NULL") = "big"
- The byte order used to represent the integer. If byteorder is 'big',
- the most significant byte is at the beginning of the byte array. If
- byteorder is 'little', the most significant byte is at the end of the
- byte array. To request the native byte order of the host system, use
- sys.byteorder as the byte order value. Default is to use 'big'.
+ The byte order used to represent the integer. If byteorder is
+ 'big', the most significant byte is at the beginning of the byte
+ array. If byteorder is 'little', the most significant byte is at
+ the end of the byte array. To request the native byte order of
+ the host system, use sys.byteorder as the byte order value.
+ Default is to use 'big'.
*
signed as is_signed: bool = False
- Determines whether two's complement is used to represent the integer.
- If signed is False and a negative integer is given, an OverflowError
- is raised.
+ Determines whether two's complement is used to represent the
+ integer. If signed is False and a negative integer is given,
+ an OverflowError is raised.
Return an array of bytes representing an integer.
[clinic start generated code]*/
@@ -6298,7 +6299,7 @@ Return an array of bytes representing an integer.
static PyObject *
int_to_bytes_impl(PyObject *self, Py_ssize_t length, PyObject *byteorder,
int is_signed)
-/*[clinic end generated code: output=89c801df114050a3 input=a0103d0e9ad85c2b]*/
+/*[clinic end generated code: output=89c801df114050a3 input=661d7e615a4f132d]*/
{
int little_endian;
PyObject *bytes;
@@ -6341,18 +6342,20 @@ int.from_bytes
bytes as bytes_obj: object
Holds the array of bytes to convert. The argument must either
- support the buffer protocol or be an iterable object producing bytes.
- Bytes and bytearray are examples of built-in objects that support the
- buffer protocol.
+ support the buffer protocol or be an iterable object producing
+ bytes. Bytes and bytearray are examples of built-in objects that
+ support the buffer protocol.
byteorder: unicode(c_default="NULL") = "big"
- The byte order used to represent the integer. If byteorder is 'big',
- the most significant byte is at the beginning of the byte array. If
- byteorder is 'little', the most significant byte is at the end of the
- byte array. To request the native byte order of the host system, use
- sys.byteorder as the byte order value. Default is to use 'big'.
+ The byte order used to represent the integer. If byteorder is
+ 'big', the most significant byte is at the beginning of the byte
+ array. If byteorder is 'little', the most significant byte is at
+ the end of the byte array. To request the native byte order of
+ the host system, use sys.byteorder as the byte order value.
+ Default is to use 'big'.
*
signed as is_signed: bool = False
- Indicates whether two's complement is used to represent the integer.
+ Indicates whether two's complement is used to represent the
+ integer.
Return the integer represented by the given array of bytes.
[clinic start generated code]*/
@@ -6360,7 +6363,7 @@ Return the integer represented by the given array of
bytes.
static PyObject *
int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj,
PyObject *byteorder, int is_signed)
-/*[clinic end generated code: output=efc5d68e31f9314f input=2ff527997fe7b0c5]*/
+/*[clinic end generated code: output=efc5d68e31f9314f input=95801e50b942e164]*/
{
int little_endian;
PyObject *long_obj, *bytes;
@@ -6495,7 +6498,8 @@ If x is not a number or if base is given, then x must be
a string,\n\
bytes, or bytearray instance representing an integer literal in the\n\
given base. The literal can be preceded by '+' or '-' and be surrounded\n\
by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.\n\
-Base 0 means to interpret the base from the string as an integer literal.\n\
+Base 0 means to interpret the base from the string as an integer\n\
+iteral.\n\
>>> int('0b100', base=0)\n\
4");
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index 5c75bdb30a25a36..ba3ecc812d6f218 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -2267,16 +2267,17 @@ memoryview.tobytes
Return the data in the buffer as a byte string.
-Order can be {'C', 'F', 'A'}. When order is 'C' or 'F', the data of the
-original array is converted to C or Fortran order. For contiguous views,
-'A' returns an exact copy of the physical memory. In particular, in-memory
-Fortran order is preserved. For non-contiguous views, the data is converted
-to C first. order=None is the same as order='C'.
+Order can be {'C', 'F', 'A'}. When order is 'C' or 'F', the data of
+the original array is converted to C or Fortran order. For
+contiguous views, 'A' returns an exact copy of the physical memory.
+In particular, in-memory Fortran order is preserved. For
+non-contiguous views, the data is converted to C first. order=None
+is the same as order='C'.
[clinic start generated code]*/
static PyObject *
memoryview_tobytes_impl(PyMemoryViewObject *self, const char *order)
-/*[clinic end generated code: output=1288b62560a32a23 input=0efa3ddaeda573a8]*/
+/*[clinic end generated code: output=1288b62560a32a23 input=119c70aa91791dc8]*/
{
Py_buffer *src = VIEW_ADDR(self);
char ord = 'C';
@@ -2316,8 +2317,8 @@ memoryview.hex
sep: object = NULL
An optional single character or byte to separate hex bytes.
bytes_per_sep: int = 1
- How many bytes between separators. Positive values count from the
- right, negative values count from the left.
+ How many bytes between separators. Positive values count from
+ the right, negative values count from the left.
Return the data in the buffer as a str of hexadecimal numbers.
@@ -2336,7 +2337,7 @@ Return the data in the buffer as a str of hexadecimal
numbers.
static PyObject *
memoryview_hex_impl(PyMemoryViewObject *self, PyObject *sep,
int bytes_per_sep)
-/*[clinic end generated code: output=430ca760f94f3ca7 input=539f6a3a5fb56946]*/
+/*[clinic end generated code: output=430ca760f94f3ca7 input=94c2495f886c786b]*/
{
Py_buffer *src = VIEW_ADDR(self);
PyObject *bytes;
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
index aee85eb72bcf06e..3d9f989ad174933 100644
--- a/Objects/odictobject.c
+++ b/Objects/odictobject.c
@@ -1148,12 +1148,13 @@ OrderedDict.popitem
Remove and return a (key, value) pair from the dictionary.
-Pairs are returned in LIFO order if last is true or FIFO order if false.
+Pairs are returned in LIFO order if last is true or FIFO order if
+false.
[clinic start generated code]*/
static PyObject *
OrderedDict_popitem_impl(PyODictObject *self, int last)
-/*[clinic end generated code: output=98e7d986690d49eb input=8aafc7433e0a40e7]*/
+/*[clinic end generated code: output=98e7d986690d49eb input=ebf1cc91579c9e54]*/
{
PyObject *key, *value, *item = NULL;
_ODictNode *node;
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 5186ff4f6f0cf5f..8bafac07a6cf492 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -341,7 +341,9 @@ PyDoc_STRVAR(slice_doc,
"slice(stop)\n\
slice(start, stop[, step])\n\
\n\
-Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).");
+Create a slice object.\n\
+\n\
+This is used for extended slicing (e.g. a[0:10:2]).");
static void
slice_dealloc(PyObject *op)
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 0f1660f8f40b217..a887d724b92df04 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -12201,7 +12201,8 @@ PyDoc_STRVAR(super_doc,
"super() -> same as super(__class__, <first argument>)\n"
"super(type) -> unbound super object\n"
"super(type, obj) -> bound super object; requires isinstance(obj, type)\n"
-"super(type, type2) -> bound super object; requires issubclass(type2, type)\n"
+"super(type, type2) -> bound super object; requires\n"
+" issubclass(type2, type)\n"
"Typical use to call a cooperative superclass method:\n"
"class C(B):\n"
" def meth(self, arg):\n"
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index bf41aabb7d5ba9e..0a7f3dfe5f66f47 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -11091,13 +11091,13 @@ str.title as unicode_title
Return a version of the string where each word is titlecased.
-More specifically, words start with uppercased characters and all remaining
-cased characters have lower case.
+More specifically, words start with uppercased characters and all
+remaining cased characters have lower case.
[clinic start generated code]*/
static PyObject *
unicode_title_impl(PyObject *self)
-/*[clinic end generated code: output=c75ae03809574902 input=fa945d669b26e683]*/
+/*[clinic end generated code: output=c75ae03809574902 input=2a07e2c7df94627a]*/
{
return case_operation(self, do_title);
}
@@ -11107,13 +11107,13 @@ str.capitalize as unicode_capitalize
Return a capitalized version of the string.
-More specifically, make the first character have upper case and the rest lower
-case.
+More specifically, make the first character have upper case and the
+rest lower case.
[clinic start generated code]*/
static PyObject *
unicode_capitalize_impl(PyObject *self)
-/*[clinic end generated code: output=e49a4c333cdb7667 input=f4cbf1016938da6d]*/
+/*[clinic end generated code: output=e49a4c333cdb7667 input=e50e50ed45a654cf]*/
{
if (PyUnicode_GET_LENGTH(self) == 0)
return unicode_result_unchanged(self);
@@ -11167,12 +11167,13 @@ str.center as unicode_center
Return a centered string of length width.
-Padding is done using the specified fill character (default is a space).
+Padding is done using the specified fill character (default is
+a space).
[clinic start generated code]*/
static PyObject *
unicode_center_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar)
-/*[clinic end generated code: output=420c8859effc7c0c input=b42b247eb26e6519]*/
+/*[clinic end generated code: output=420c8859effc7c0c input=df91017dfd186a78]*/
{
Py_ssize_t marg, left;
@@ -11772,13 +11773,14 @@ str.count as unicode_count -> Py_ssize_t
Return the number of non-overlapping occurrences of substring sub in string
S[start:end].
-Optional arguments start and end are interpreted as in slice notation.
+Optional arguments start and end are interpreted as in slice
+notation.
[clinic start generated code]*/
static Py_ssize_t
unicode_count_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=8fcc3aef0b18edbf input=6f168ffd94be8785]*/
+/*[clinic end generated code: output=8fcc3aef0b18edbf input=0db5f2367599b50d]*/
{
assert(PyUnicode_Check(str));
assert(PyUnicode_Check(substr));
@@ -11851,8 +11853,8 @@ str.encode as unicode_encode
errors: str(c_default="NULL") = 'strict'
The error handling scheme to use for encoding errors.
The default is 'strict' meaning that encoding errors raise a
- UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
- 'xmlcharrefreplace' as well as any other name registered with
+ UnicodeEncodeError. Other possible values are 'ignore', 'replace'
+ and 'xmlcharrefreplace' as well as any other name registered with
codecs.register_error that can handle UnicodeEncodeErrors.
Encode the string using the codec registered for encoding.
@@ -11860,7 +11862,7 @@ Encode the string using the codec registered for
encoding.
static PyObject *
unicode_encode_impl(PyObject *self, const char *encoding, const char *errors)
-/*[clinic end generated code: output=bf78b6e2a9470e3c input=f0a9eb293d08fe02]*/
+/*[clinic end generated code: output=bf78b6e2a9470e3c input=b85a9645cb33b729]*/
{
return PyUnicode_AsEncodedString(self, encoding, errors);
}
@@ -11956,14 +11958,14 @@ str.find as unicode_find = str.count
Return the lowest index in S where substring sub is found, such that sub is
contained within S[start:end].
-Optional arguments start and end are interpreted as in slice notation.
-Return -1 on failure.
+Optional arguments start and end are interpreted as in slice
+notation. Return -1 on failure.
[clinic start generated code]*/
static Py_ssize_t
unicode_find_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=51dbe6255712e278 input=4a89d2d68ef57256]*/
+/*[clinic end generated code: output=51dbe6255712e278 input=6be5f4af6fc545d8]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, 1);
if (result < 0) {
@@ -12019,14 +12021,14 @@ str.index as unicode_index = str.count
Return the lowest index in S where substring sub is found, such that sub is
contained within S[start:end].
-Optional arguments start and end are interpreted as in slice notation.
-Raises ValueError when the substring is not found.
+Optional arguments start and end are interpreted as in slice
+notation. Raises ValueError when the substring is not found.
[clinic start generated code]*/
static Py_ssize_t
unicode_index_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=77558288837cdf40 input=d986aeac0be14a1c]*/
+/*[clinic end generated code: output=77558288837cdf40 input=39f29462607c38cf]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, 1);
if (result == -1) {
@@ -12059,13 +12061,13 @@ str.islower as unicode_islower
Return True if the string is a lowercase string, False otherwise.
-A string is lowercase if all cased characters in the string are lowercase and
-there is at least one cased character in the string.
+A string is lowercase if all cased characters in the string are
+lowercase and there is at least one cased character in the string.
[clinic start generated code]*/
static PyObject *
unicode_islower_impl(PyObject *self)
-/*[clinic end generated code: output=dbd41995bd005b81 input=acec65ac6821ae47]*/
+/*[clinic end generated code: output=dbd41995bd005b81 input=1879b48dfc628366]*/
{
Py_ssize_t i, length;
int kind;
@@ -12102,13 +12104,13 @@ str.isupper as unicode_isupper
Return True if the string is an uppercase string, False otherwise.
-A string is uppercase if all cased characters in the string are uppercase and
-there is at least one cased character in the string.
+A string is uppercase if all cased characters in the string are
+uppercase and there is at least one cased character in the string.
[clinic start generated code]*/
static PyObject *
unicode_isupper_impl(PyObject *self)
-/*[clinic end generated code: output=049209c8e7f15f59 input=e9b1feda5d17f2d3]*/
+/*[clinic end generated code: output=049209c8e7f15f59 input=77d29904aef0e3a0]*/
{
Py_ssize_t i, length;
int kind;
@@ -12201,13 +12203,13 @@ str.isspace as unicode_isspace
Return True if the string is a whitespace string, False otherwise.
-A string is whitespace if all characters in the string are whitespace and there
-is at least one character in the string.
+A string is whitespace if all characters in the string are
+whitespace and there is at least one character in the string.
[clinic start generated code]*/
static PyObject *
unicode_isspace_impl(PyObject *self)
-/*[clinic end generated code: output=163a63bfa08ac2b9 input=fe462cb74f8437d8]*/
+/*[clinic end generated code: output=163a63bfa08ac2b9 input=29e09560fc23fbeb]*/
{
Py_ssize_t i, length;
int kind;
@@ -12239,13 +12241,13 @@ str.isalpha as unicode_isalpha
Return True if the string is an alphabetic string, False otherwise.
-A string is alphabetic if all characters in the string are alphabetic and there
-is at least one character in the string.
+A string is alphabetic if all characters in the string are
+alphabetic and there is at least one character in the string.
[clinic start generated code]*/
static PyObject *
unicode_isalpha_impl(PyObject *self)
-/*[clinic end generated code: output=cc81b9ac3883ec4f input=d0fd18a96cbca5eb]*/
+/*[clinic end generated code: output=cc81b9ac3883ec4f input=9906a07f3e04892e]*/
{
Py_ssize_t i, length;
int kind;
@@ -12276,13 +12278,13 @@ str.isalnum as unicode_isalnum
Return True if the string is an alpha-numeric string, False otherwise.
-A string is alpha-numeric if all characters in the string are alpha-numeric and
-there is at least one character in the string.
+A string is alpha-numeric if all characters in the string are
+alpha-numeric and there is at least one character in the string.
[clinic start generated code]*/
static PyObject *
unicode_isalnum_impl(PyObject *self)
-/*[clinic end generated code: output=a5a23490ffc3660c input=5c6579bf2e04758c]*/
+/*[clinic end generated code: output=a5a23490ffc3660c input=fd90c03fd83af0c7]*/
{
int kind;
const void *data;
@@ -12315,13 +12317,13 @@ str.isdecimal as unicode_isdecimal
Return True if the string is a decimal string, False otherwise.
-A string is a decimal string if all characters in the string are decimal and
-there is at least one character in the string.
+A string is a decimal string if all characters in the string are
+decimal and there is at least one character in the string.
[clinic start generated code]*/
static PyObject *
unicode_isdecimal_impl(PyObject *self)
-/*[clinic end generated code: output=fb2dcdb62d3fc548 input=336bc97ab4c8268f]*/
+/*[clinic end generated code: output=fb2dcdb62d3fc548 input=63b0453c48cad0af]*/
{
Py_ssize_t i, length;
int kind;
@@ -12352,13 +12354,13 @@ str.isdigit as unicode_isdigit
Return True if the string is a digit string, False otherwise.
-A string is a digit string if all characters in the string are digits and there
-is at least one character in the string.
+A string is a digit string if all characters in the string are
+digits and there is at least one character in the string.
[clinic start generated code]*/
static PyObject *
unicode_isdigit_impl(PyObject *self)
-/*[clinic end generated code: output=10a6985311da6858 input=901116c31deeea4c]*/
+/*[clinic end generated code: output=10a6985311da6858 input=353b03747b062e4b]*/
{
Py_ssize_t i, length;
int kind;
@@ -12390,13 +12392,13 @@ str.isnumeric as unicode_isnumeric
Return True if the string is a numeric string, False otherwise.
-A string is numeric if all characters in the string are numeric and there is at
-least one character in the string.
+A string is numeric if all characters in the string are numeric and
+there is at least one character in the string.
[clinic start generated code]*/
static PyObject *
unicode_isnumeric_impl(PyObject *self)
-/*[clinic end generated code: output=9172a32d9013051a input=722507db976f826c]*/
+/*[clinic end generated code: output=9172a32d9013051a input=83b2a072ed7aff48]*/
{
Py_ssize_t i, length;
int kind;
@@ -12470,13 +12472,13 @@ str.isidentifier as unicode_isidentifier
Return True if the string is a valid Python identifier, False otherwise.
-Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
-such as "def" or "class".
+Call keyword.iskeyword(s) to test whether string s is a reserved
+identifier, such as "def" or "class".
[clinic start generated code]*/
static PyObject *
unicode_isidentifier_impl(PyObject *self)
-/*[clinic end generated code: output=fe585a9666572905 input=2d807a104f21c0c5]*/
+/*[clinic end generated code: output=fe585a9666572905 input=82e830f25b2a7945]*/
{
return PyBool_FromLong(PyUnicode_IsIdentifier(self));
}
@@ -12522,15 +12524,15 @@ str.join as unicode_join
Concatenate any number of strings.
-The string whose method is called is inserted in between each given string.
-The result is returned as a new string.
+The string whose method is called is inserted in between each given
+string. The result is returned as a new string.
Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
[clinic start generated code]*/
static PyObject *
unicode_join(PyObject *self, PyObject *iterable)
-/*[clinic end generated code: output=6857e7cecfe7bf98 input=2f70422bfb8fa189]*/
+/*[clinic end generated code: output=6857e7cecfe7bf98 input=fd330a11ee845fb2]*/
{
return PyUnicode_Join(self, iterable);
}
@@ -12550,12 +12552,13 @@ str.ljust as unicode_ljust
Return a left-justified string of length width.
-Padding is done using the specified fill character (default is a space).
+Padding is done using the specified fill character (default is
+a space).
[clinic start generated code]*/
static PyObject *
unicode_ljust_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar)
-/*[clinic end generated code: output=1cce0e0e0a0b84b3 input=3ab599e335e60a32]*/
+/*[clinic end generated code: output=1cce0e0e0a0b84b3 input=8a55f06694c20ed6]*/
{
if (PyUnicode_GET_LENGTH(self) >= width)
return unicode_result_unchanged(self);
@@ -12905,13 +12908,14 @@ str.removeprefix as unicode_removeprefix
Return a str with the given prefix string removed if present.
-If the string starts with the prefix string, return string[len(prefix):].
-Otherwise, return a copy of the original string.
+If the string starts with the prefix string, return
+string[len(prefix):]. Otherwise, return a copy of the original
+string.
[clinic start generated code]*/
static PyObject *
unicode_removeprefix_impl(PyObject *self, PyObject *prefix)
-/*[clinic end generated code: output=f1e5945e9763bcb9 input=27ec40b99a37eb88]*/
+/*[clinic end generated code: output=f1e5945e9763bcb9 input=90d162724944bfa7]*/
{
int match = tailmatch(self, prefix, 0, PY_SSIZE_T_MAX, -1);
if (match == -1) {
@@ -12932,14 +12936,14 @@ str.removesuffix as unicode_removesuffix
Return a str with the given suffix string removed if present.
-If the string ends with the suffix string and that suffix is not empty,
-return string[:-len(suffix)]. Otherwise, return a copy of the original
-string.
+If the string ends with the suffix string and that suffix is not
+empty, return string[:-len(suffix)]. Otherwise, return a copy of
+the original string.
[clinic start generated code]*/
static PyObject *
unicode_removesuffix_impl(PyObject *self, PyObject *suffix)
-/*[clinic end generated code: output=d36629e227636822 input=12cc32561e769be4]*/
+/*[clinic end generated code: output=d36629e227636822 input=6efc96152d4bfcd5]*/
{
int match = tailmatch(self, suffix, 0, PY_SSIZE_T_MAX, +1);
if (match == -1) {
@@ -13048,14 +13052,14 @@ str.rfind as unicode_rfind = str.count
Return the highest index in S where substring sub is found, such that sub is
contained within S[start:end].
-Optional arguments start and end are interpreted as in slice notation.
-Return -1 on failure.
+Optional arguments start and end are interpreted as in slice
+notation. Return -1 on failure.
[clinic start generated code]*/
static Py_ssize_t
unicode_rfind_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=880b29f01dd014c8 input=898361fb71f59294]*/
+/*[clinic end generated code: output=880b29f01dd014c8 input=130dfb5a94532dd6]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, -1);
if (result < 0) {
@@ -13069,14 +13073,14 @@ str.rindex as unicode_rindex = str.count
Return the highest index in S where substring sub is found, such that sub is
contained within S[start:end].
-Optional arguments start and end are interpreted as in slice notation.
-Raises ValueError when the substring is not found.
+Optional arguments start and end are interpreted as in slice
+notation. Raises ValueError when the substring is not found.
[clinic start generated code]*/
static Py_ssize_t
unicode_rindex_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=5f3aef124c867fe1 input=35943dead6c1ea9d]*/
+/*[clinic end generated code: output=5f3aef124c867fe1 input=97a766ba968a214e]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, -1);
if (result == -1) {
@@ -13097,12 +13101,13 @@ str.rjust as unicode_rjust
Return a right-justified string of length width.
-Padding is done using the specified fill character (default is a space).
+Padding is done using the specified fill character (default is
+a space).
[clinic start generated code]*/
static PyObject *
unicode_rjust_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar)
-/*[clinic end generated code: output=804a1a57fbe8d5cf input=d05f550b5beb1f72]*/
+/*[clinic end generated code: output=804a1a57fbe8d5cf input=1256a8d659589907]*/
{
if (PyUnicode_GET_LENGTH(self) >= width)
return unicode_result_unchanged(self);
@@ -13125,9 +13130,9 @@ str.split as unicode_split
sep: object = None
The separator used to split the string.
- When set to None (the default value), will split on any whitespace
- character (including \n \r \t \f and spaces) and will discard
- empty strings from the result.
+ When set to None (the default value), will split on any
+ whitespace character (including \n \r \t \f and spaces) and
+ will discard empty strings from the result.
maxsplit: Py_ssize_t = -1
Maximum number of splits.
-1 (the default value) means no limit.
@@ -13136,15 +13141,15 @@ Return a list of the substrings in the string, using
sep as the separator string
Splitting starts at the front of the string and works to the end.
-Note, str.split() is mainly useful for data that has been intentionally
-delimited. With natural text that includes punctuation, consider using
-the regular expression module.
+Note, str.split() is mainly useful for data that has been
+intentionally delimited. With natural text that includes
+punctuation, consider using the regular expression module.
[clinic start generated code]*/
static PyObject *
unicode_split_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit)
-/*[clinic end generated code: output=3a65b1db356948dc input=a29bcc0c7a5af0eb]*/
+/*[clinic end generated code: output=3a65b1db356948dc input=9dc157701983897d]*/
{
if (sep == Py_None)
return split(self, NULL, maxsplit);
@@ -13268,17 +13273,17 @@ str.partition as unicode_partition
Partition the string into three parts using the given separator.
-This will search for the separator in the string. If the separator is found,
-returns a 3-tuple containing the part before the separator, the separator
-itself, and the part after it.
+This will search for the separator in the string. If the separator
+is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it.
-If the separator is not found, returns a 3-tuple containing the original string
-and two empty strings.
+If the separator is not found, returns a 3-tuple containing
+the original string and two empty strings.
[clinic start generated code]*/
static PyObject *
unicode_partition(PyObject *self, PyObject *sep)
-/*[clinic end generated code: output=e4ced7bd253ca3c4 input=f29b8d06c63e50be]*/
+/*[clinic end generated code: output=e4ced7bd253ca3c4 input=e45faa8c26270cb1]*/
{
return PyUnicode_Partition(self, sep);
}
@@ -13288,17 +13293,18 @@ str.rpartition as unicode_rpartition = str.partition
Partition the string into three parts using the given separator.
-This will search for the separator in the string, starting at the end. If
-the separator is found, returns a 3-tuple containing the part before the
-separator, the separator itself, and the part after it.
+This will search for the separator in the string, starting at the
+end. If the separator is found, returns a 3-tuple containing the
+part before the separator, the separator itself, and the part after
+it.
-If the separator is not found, returns a 3-tuple containing two empty strings
-and the original string.
+If the separator is not found, returns a 3-tuple containing two
+empty strings and the original string.
[clinic start generated code]*/
static PyObject *
unicode_rpartition(PyObject *self, PyObject *sep)
-/*[clinic end generated code: output=1aa13cf1156572aa input=c4b7db3ef5cf336a]*/
+/*[clinic end generated code: output=1aa13cf1156572aa input=53a7f8cb19975b7c]*/
{
return PyUnicode_RPartition(self, sep);
}
@@ -13342,13 +13348,13 @@ str.splitlines as unicode_splitlines
Return a list of the lines in the string, breaking at line boundaries.
-Line breaks are not included in the resulting list unless keepends is given and
-true.
+Line breaks are not included in the resulting list unless keepends
+is given and true.
[clinic start generated code]*/
static PyObject *
unicode_splitlines_impl(PyObject *self, int keepends)
-/*[clinic end generated code: output=f664dcdad153ec40 input=ba6ad05ee85d2b55]*/
+/*[clinic end generated code: output=f664dcdad153ec40 input=bf780246bee5462b]*/
{
return PyUnicode_Splitlines(self, keepends);
}
@@ -13426,18 +13432,19 @@ str.maketrans as unicode_maketrans
Return a translation table usable for str.translate().
-If there is only one argument, it must be a dictionary mapping Unicode
-ordinals (integers) or characters to Unicode ordinals, strings or None.
-Character keys will be then converted to ordinals.
-If there are two arguments, they must be strings of equal length, and
-in the resulting dictionary, each character in x will be mapped to the
-character at the same position in y. If there is a third argument, it
-must be a string, whose characters will be mapped to None in the result.
+If there is only one argument, it must be a dictionary mapping
+Unicode ordinals (integers) or characters to Unicode ordinals,
+strings or None. Character keys will be then converted to ordinals.
+If there are two arguments, they must be strings of equal length,
+and in the resulting dictionary, each character in x will be mapped
+to the character at the same position in y. If there is a third
+argument, it must be a string, whose characters will be mapped to
+None in the result.
[clinic start generated code]*/
static PyObject *
unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z)
-/*[clinic end generated code: output=a925c89452bd5881 input=7bfbf529a293c6c5]*/
+/*[clinic end generated code: output=a925c89452bd5881 input=66bc00a1b4258a6e]*/
{
PyObject *new = NULL, *key, *value;
Py_ssize_t i = 0;
@@ -13520,20 +13527,21 @@ unicode_maketrans_impl(PyObject *x, PyObject *y,
PyObject *z)
str.translate as unicode_translate
table: object
- Translation table, which must be a mapping of Unicode ordinals to
- Unicode ordinals, strings, or None.
+ Translation table, which must be a mapping of Unicode ordinals
+ to Unicode ordinals, strings, or None.
/
Replace each character in the string using the given translation table.
-The table must implement lookup/indexing via __getitem__, for instance a
-dictionary or list. If this operation raises LookupError, the character is
-left untouched. Characters mapped to None are deleted.
+The table must implement lookup/indexing via __getitem__, for
+instance a dictionary or list. If this operation raises
+LookupError, the character is left untouched. Characters mapped to
+None are deleted.
[clinic start generated code]*/
static PyObject *
unicode_translate(PyObject *self, PyObject *table)
-/*[clinic end generated code: output=3cb448ff2fd96bf3 input=6d38343db63d8eb0]*/
+/*[clinic end generated code: output=3cb448ff2fd96bf3 input=9874c06808f58900]*/
{
return _PyUnicode_TranslateCharmap(self, table, "ignore");
}
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index fe54919c6657912..a8e9a17d656741f 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -272,15 +272,16 @@ should be a list of names to emulate ``from name import
...``, or an
empty list to emulate ``import name``.
When importing a module from a package, note that __import__('A.B', ...)
returns package A when fromlist is empty, but its submodule B when
-fromlist is not empty. The level argument is used to determine whether to
-perform absolute or relative imports: 0 is absolute, while a positive number
-is the number of parent directories to search relative to the current module.
+fromlist is not empty. The level argument is used to determine whether
+to perform absolute or relative imports: 0 is absolute, while a positive
+number is the number of parent directories to search relative to the
+current module.
[clinic start generated code]*/
static PyObject *
builtin___import___impl(PyObject *module, PyObject *name, PyObject *globals,
PyObject *locals, PyObject *fromlist, int level)
-/*[clinic end generated code: output=4febeda88a0cd245 input=73f4b960ea5b9dd6]*/
+/*[clinic end generated code: output=4febeda88a0cd245 input=e3096a230383f72d]*/
{
return PyImport_ImportModuleLevelObject(name, globals, locals,
fromlist, level);
@@ -634,8 +635,9 @@ PyDoc_STRVAR(filter_doc,
"filter(function, iterable, /)\n\
--\n\
\n\
-Return an iterator yielding those items of iterable for which function(item)\n\
-is true. If function is None, return the items that are true.");
+Return an iterator yielding those items of iterable for which\n\
+function(item) is true. If function is None, return the items that\n\
+are true.");
PyTypeObject PyFilter_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
@@ -755,23 +757,24 @@ compile as builtin_compile
Compile source into a code object that can be executed by exec() or eval().
-The source code may represent a Python module, statement or expression.
+The source code may represent a Python module, statement or
+expression.
The filename will be used for run-time error messages.
The mode must be 'exec' to compile a module, 'single' to compile a
single (interactive) statement, or 'eval' to compile an expression.
-The flags argument, if present, controls which future statements influence
-the compilation of the code.
+The flags argument, if present, controls which future statements
+influence the compilation of the code.
The dont_inherit argument, if true, stops the compilation inheriting
the effects of any future statements in effect in the code calling
-compile; if absent or false these statements do influence the compilation,
-in addition to any features explicitly specified.
+compile; if absent or false these statements do influence the
+compilation, in addition to any features explicitly specified.
[clinic start generated code]*/
static PyObject *
builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
const char *mode, int flags, int dont_inherit,
int optimize, int feature_version)
-/*[clinic end generated code: output=b0c09c84f116d3d7 input=8f0069edbdac381b]*/
+/*[clinic end generated code: output=b0c09c84f116d3d7 input=d69ec2180ff24031]*/
{
PyObject *source_copy;
const char *str;
@@ -907,10 +910,10 @@ PyDoc_STRVAR(dir_doc,
"dir([object]) -> list of strings\n"
"\n"
"If called without an argument, return the names in the current scope.\n"
-"Else, return an alphabetized list of names comprising (some of) the
attributes\n"
-"of the given object, and of attributes reachable from it.\n"
-"If the object supplies a method named __dir__, it will be used; otherwise\n"
-"the default dir() logic is used and returns:\n"
+"Else, return an alphabetized list of names comprising (some of) the\n"
+"attributes of the given object, and of attributes reachable from it.\n"
+"If the object supplies a method named __dir__, it will be used;\n"
+"otherwise the default dir() logic is used and returns:\n"
" for a module object: the module's attributes.\n"
" for a class object: its attributes, and recursively the attributes\n"
" of its bases.\n"
@@ -1249,9 +1252,11 @@ builtin_getattr(PyObject *self, PyObject *const *args,
Py_ssize_t nargs)
PyDoc_STRVAR(getattr_doc,
"getattr(object, name[, default]) -> value\n\
\n\
-Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.\n\
-When a default argument is given, it is returned when the attribute doesn't\n\
-exist; without it, an exception is raised in that case.");
+Get a named attribute from an object.\n\
+\n\
+getattr(x, 'y') is equivalent to x.y.\n\
+When a default argument is given, it is returned when the attribute\n\
+doesn't exist; without it, an exception is raised in that case.");
/*[clinic input]
@@ -1259,13 +1264,13 @@ globals as builtin_globals
Return the dictionary containing the current scope's global variables.
-NOTE: Updates to this dictionary *will* affect name lookups in the current
-global scope and vice-versa.
+NOTE: Updates to this dictionary *will* affect name lookups in the
+current global scope and vice-versa.
[clinic start generated code]*/
static PyObject *
builtin_globals_impl(PyObject *module)
-/*[clinic end generated code: output=e5dd1527067b94d2 input=9327576f92bb48ba]*/
+/*[clinic end generated code: output=e5dd1527067b94d2 input=6d725a9b48d1eaeb]*/
{
PyObject *globals;
if (_PyEval_GetFrame() != NULL) {
@@ -1618,8 +1623,8 @@ PyDoc_STRVAR(map_doc,
Make an iterator that computes the function using arguments from\n\
each of the iterables. Stops when the shortest iterable is exhausted.\n\
\n\
-If strict is true and one of the arguments is exhausted before the others,\n\
-raise a ValueError.");
+If strict is true and one of the arguments is exhausted before the\n\
+others, raise a ValueError.");
PyTypeObject PyMap_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
@@ -1706,8 +1711,8 @@ builtin_next(PyObject *self, PyObject *const *args,
Py_ssize_t nargs)
PyDoc_STRVAR(next_doc,
"next(iterator[, default])\n\
\n\
-Return the next item from the iterator. If default is given and the iterator\n\
-is exhausted, it is returned instead of raising StopIteration.");
+Return the next item from the iterator. If default is given and the\n\
+iterator is exhausted, it is returned instead of raising StopIteration.");
/*[clinic input]
@@ -1830,7 +1835,8 @@ iter(callable, sentinel) -> iterator\n\
\n\
Get an iterator from an object. In the first form, the argument must\n\
supply its own iterator, or be a sequence.\n\
-In the second form, the callable is called until it returns the sentinel.");
+In the second form, the callable is called until it returns the\n\
+sentinel.");
/*[clinic input]
@@ -1924,14 +1930,15 @@ locals as builtin_locals
Return a dictionary containing the current scope's local variables.
-NOTE: Whether or not updates to this dictionary will affect name lookups in
-the local scope and vice-versa is *implementation dependent* and not
-covered by any backwards compatibility guarantees.
+NOTE: Whether or not updates to this dictionary will affect name
+lookups in the local scope and vice-versa is *implementation
+dependent* and not covered by any backwards compatibility
+guarantees.
[clinic start generated code]*/
static PyObject *
builtin_locals_impl(PyObject *module)
-/*[clinic end generated code: output=b46c94015ce11448 input=7874018d478d5c4b]*/
+/*[clinic end generated code: output=b46c94015ce11448 input=989cc75c22167c42]*/
{
PyObject *locals;
if (_PyEval_GetFrame() != NULL) {
@@ -2191,14 +2198,14 @@ pow as builtin_pow
Equivalent to base**exp with 2 arguments or base**exp % mod with 3 arguments
-Some types, such as ints, are able to use a more efficient algorithm when
-invoked using the three argument form.
+Some types, such as ints, are able to use a more efficient algorithm
+when invoked using the three argument form.
[clinic start generated code]*/
static PyObject *
builtin_pow_impl(PyObject *module, PyObject *base, PyObject *exp,
PyObject *mod)
-/*[clinic end generated code: output=3ca1538221bbf15f input=435dbd48a12efb23]*/
+/*[clinic end generated code: output=3ca1538221bbf15f input=6133ded72c7db82e]*/
{
return PyNumber_Power(base, exp, mod);
}
@@ -2319,13 +2326,14 @@ Read a string from standard input. The trailing
newline is stripped.
The prompt string, if given, is printed to standard output without a
trailing newline before reading input.
-If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
+If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise
+EOFError.
On *nix systems, readline is used if available.
[clinic start generated code]*/
static PyObject *
builtin_input_impl(PyObject *module, PyObject *prompt)
-/*[clinic end generated code: output=83db5a191e7a0d60 input=159c46d4ae40977e]*/
+/*[clinic end generated code: output=83db5a191e7a0d60 input=ebb939c954639427]*/
{
PyObject *fin = NULL;
PyObject *fout = NULL;
@@ -2593,13 +2601,14 @@ round as builtin_round
Round a number to a given precision in decimal digits.
-The return value is an integer if ndigits is omitted or None. Otherwise
-the return value has the same type as the number. ndigits may be negative.
+The return value is an integer if ndigits is omitted or None.
+Otherwise the return value has the same type as the number. ndigits
+may be negative.
[clinic start generated code]*/
static PyObject *
builtin_round_impl(PyObject *module, PyObject *number, PyObject *ndigits)
-/*[clinic end generated code: output=ff0d9dd176c02ede input=275678471d7aca15]*/
+/*[clinic end generated code: output=ff0d9dd176c02ede input=bdcb7c67bf4a4320]*/
{
PyObject *result;
if (ndigits == Py_None) {
@@ -2631,8 +2640,8 @@ sorted as builtin_sorted
Return a new list containing all items from the iterable in ascending order.
-A custom key function can be supplied to customize the sort order, and the
-reverse flag can be set to request the result in descending order.
+A custom key function can be supplied to customize the sort order, and
+the reverse flag can be set to request the result in descending order.
[end disabled clinic input]*/
PyDoc_STRVAR(builtin_sorted__doc__,
@@ -2775,13 +2784,13 @@ sum as builtin_sum
Return the sum of a 'start' value (default: 0) plus an iterable of numbers
When the iterable is empty, return the start value.
-This function is intended specifically for use with numeric values and may
-reject non-numeric types.
+This function is intended specifically for use with numeric values and
+may reject non-numeric types.
[clinic start generated code]*/
static PyObject *
builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
-/*[clinic end generated code: output=df758cec7d1d302f input=162b50765250d222]*/
+/*[clinic end generated code: output=df758cec7d1d302f input=83d1bc7fd7f7ad3b]*/
{
PyObject *result = start;
PyObject *temp, *item, *iter;
@@ -3025,15 +3034,15 @@ isinstance as builtin_isinstance
Return whether an object is an instance of a class or of a subclass thereof.
-A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to
-check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)
-or ...`` etc.
+A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the
+target to check against. This is equivalent to ``isinstance(x, A) or
+isinstance(x, B) or ...`` etc.
[clinic start generated code]*/
static PyObject *
builtin_isinstance_impl(PyObject *module, PyObject *obj,
PyObject *class_or_tuple)
-/*[clinic end generated code: output=6faf01472c13b003 input=ffa743db1daf7549]*/
+/*[clinic end generated code: output=6faf01472c13b003 input=477d04768621c24b]*/
{
int retval;
@@ -3053,15 +3062,15 @@ issubclass as builtin_issubclass
Return whether 'cls' is derived from another class or is the same class.
-A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to
-check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)
-or ...``.
+A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the
+target to check against. This is equivalent to ``issubclass(x, A) or
+issubclass(x, B) or ...``.
[clinic start generated code]*/
static PyObject *
builtin_issubclass_impl(PyObject *module, PyObject *cls,
PyObject *class_or_tuple)
-/*[clinic end generated code: output=358412410cd7a250 input=a24b9f3d58c370d6]*/
+/*[clinic end generated code: output=358412410cd7a250 input=a91ce96345a6705d]*/
{
int retval;
@@ -3291,13 +3300,13 @@ PyDoc_STRVAR(zip_doc,
"zip(*iterables, strict=False)\n\
--\n\
\n\
-The zip object yields n-length tuples, where n is the number of iterables\n\
-passed as positional arguments to zip(). The i-th element in every tuple\n\
-comes from the i-th iterable argument to zip(). This continues until the\n\
-shortest argument is exhausted.\n\
+The zip object yields n-length tuples, where n is the number of\n\
+iterables passed as positional arguments to zip(). The i-th element\n\
+in every tuple comes from the i-th iterable argument to zip(). This\n\
+continues until the shortest argument is exhausted.\n\
\n\
-If strict is true and one of the arguments is exhausted before the others,\n\
-raise a ValueError.\n\
+If strict is true and one of the arguments is exhausted before the\n\
+others, raise a ValueError.\n\
\n\
>>> list(zip('abcdefg', range(3), range(4)))\n\
[('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]");
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
index 578e852ce9eb61e..57f307ef7ad9dbb 100644
--- a/Python/clinic/bltinmodule.c.h
+++ b/Python/clinic/bltinmodule.c.h
@@ -25,9 +25,10 @@ PyDoc_STRVAR(builtin___import____doc__,
"empty list to emulate ``import name``.\n"
"When importing a module from a package, note that __import__(\'A.B\', ...)\n"
"returns package A when fromlist is empty, but its submodule B when\n"
-"fromlist is not empty. The level argument is used to determine whether to\n"
-"perform absolute or relative imports: 0 is absolute, while a positive
number\n"
-"is the number of parent directories to search relative to the current
module.");
+"fromlist is not empty. The level argument is used to determine whether\n"
+"to perform absolute or relative imports: 0 is absolute, while a positive\n"
+"number is the number of parent directories to search relative to the\n"
+"current module.");
#define BUILTIN___IMPORT___METHODDEF \
{"__import__", _PyCFunction_CAST(builtin___import__),
METH_FASTCALL|METH_KEYWORDS, builtin___import____doc__},
@@ -243,16 +244,17 @@ PyDoc_STRVAR(builtin_compile__doc__,
"\n"
"Compile source into a code object that can be executed by exec() or eval().\n"
"\n"
-"The source code may represent a Python module, statement or expression.\n"
+"The source code may represent a Python module, statement or\n"
+"expression.\n"
"The filename will be used for run-time error messages.\n"
"The mode must be \'exec\' to compile a module, \'single\' to compile a\n"
"single (interactive) statement, or \'eval\' to compile an expression.\n"
-"The flags argument, if present, controls which future statements influence\n"
-"the compilation of the code.\n"
+"The flags argument, if present, controls which future statements\n"
+"influence the compilation of the code.\n"
"The dont_inherit argument, if true, stops the compilation inheriting\n"
"the effects of any future statements in effect in the code calling\n"
-"compile; if absent or false these statements do influence the compilation,\n"
-"in addition to any features explicitly specified.");
+"compile; if absent or false these statements do influence the\n"
+"compilation, in addition to any features explicitly specified.");
#define BUILTIN_COMPILE_METHODDEF \
{"compile", _PyCFunction_CAST(builtin_compile),
METH_FASTCALL|METH_KEYWORDS, builtin_compile__doc__},
@@ -580,8 +582,8 @@ PyDoc_STRVAR(builtin_globals__doc__,
"\n"
"Return the dictionary containing the current scope\'s global variables.\n"
"\n"
-"NOTE: Updates to this dictionary *will* affect name lookups in the current\n"
-"global scope and vice-versa.");
+"NOTE: Updates to this dictionary *will* affect name lookups in the\n"
+"current global scope and vice-versa.");
#define BUILTIN_GLOBALS_METHODDEF \
{"globals", (PyCFunction)builtin_globals, METH_NOARGS,
builtin_globals__doc__},
@@ -807,9 +809,10 @@ PyDoc_STRVAR(builtin_locals__doc__,
"\n"
"Return a dictionary containing the current scope\'s local variables.\n"
"\n"
-"NOTE: Whether or not updates to this dictionary will affect name lookups in\n"
-"the local scope and vice-versa is *implementation dependent* and not\n"
-"covered by any backwards compatibility guarantees.");
+"NOTE: Whether or not updates to this dictionary will affect name\n"
+"lookups in the local scope and vice-versa is *implementation\n"
+"dependent* and not covered by any backwards compatibility\n"
+"guarantees.");
#define BUILTIN_LOCALS_METHODDEF \
{"locals", (PyCFunction)builtin_locals, METH_NOARGS,
builtin_locals__doc__},
@@ -856,8 +859,8 @@ PyDoc_STRVAR(builtin_pow__doc__,
"\n"
"Equivalent to base**exp with 2 arguments or base**exp % mod with 3
arguments\n"
"\n"
-"Some types, such as ints, are able to use a more efficient algorithm when\n"
-"invoked using the three argument form.");
+"Some types, such as ints, are able to use a more efficient algorithm\n"
+"when invoked using the three argument form.");
#define BUILTIN_POW_METHODDEF \
{"pow", _PyCFunction_CAST(builtin_pow), METH_FASTCALL|METH_KEYWORDS,
builtin_pow__doc__},
@@ -1033,7 +1036,8 @@ PyDoc_STRVAR(builtin_input__doc__,
"The prompt string, if given, is printed to standard output without a\n"
"trailing newline before reading input.\n"
"\n"
-"If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise
EOFError.\n"
+"If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise\n"
+"EOFError.\n"
"On *nix systems, readline is used if available.");
#define BUILTIN_INPUT_METHODDEF \
@@ -1079,8 +1083,9 @@ PyDoc_STRVAR(builtin_round__doc__,
"\n"
"Round a number to a given precision in decimal digits.\n"
"\n"
-"The return value is an integer if ndigits is omitted or None. Otherwise\n"
-"the return value has the same type as the number. ndigits may be negative.");
+"The return value is an integer if ndigits is omitted or None.\n"
+"Otherwise the return value has the same type as the number. ndigits\n"
+"may be negative.");
#define BUILTIN_ROUND_METHODDEF \
{"round", _PyCFunction_CAST(builtin_round), METH_FASTCALL|METH_KEYWORDS,
builtin_round__doc__},
@@ -1148,8 +1153,8 @@ PyDoc_STRVAR(builtin_sum__doc__,
"Return the sum of a \'start\' value (default: 0) plus an iterable of
numbers\n"
"\n"
"When the iterable is empty, return the start value.\n"
-"This function is intended specifically for use with numeric values and may\n"
-"reject non-numeric types.");
+"This function is intended specifically for use with numeric values and\n"
+"may reject non-numeric types.");
#define BUILTIN_SUM_METHODDEF \
{"sum", _PyCFunction_CAST(builtin_sum), METH_FASTCALL|METH_KEYWORDS,
builtin_sum__doc__},
@@ -1216,9 +1221,9 @@ PyDoc_STRVAR(builtin_isinstance__doc__,
"\n"
"Return whether an object is an instance of a class or of a subclass
thereof.\n"
"\n"
-"A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target
to\n"
-"check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)\n"
-"or ...`` etc.");
+"A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the\n"
+"target to check against. This is equivalent to ``isinstance(x, A) or\n"
+"isinstance(x, B) or ...`` etc.");
#define BUILTIN_ISINSTANCE_METHODDEF \
{"isinstance", _PyCFunction_CAST(builtin_isinstance), METH_FASTCALL,
builtin_isinstance__doc__},
@@ -1251,9 +1256,9 @@ PyDoc_STRVAR(builtin_issubclass__doc__,
"\n"
"Return whether \'cls\' is derived from another class or is the same class.\n"
"\n"
-"A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target
to\n"
-"check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)\n"
-"or ...``.");
+"A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the\n"
+"target to check against. This is equivalent to ``issubclass(x, A) or\n"
+"issubclass(x, B) or ...``.");
#define BUILTIN_ISSUBCLASS_METHODDEF \
{"issubclass", _PyCFunction_CAST(builtin_issubclass), METH_FASTCALL,
builtin_issubclass__doc__},
@@ -1279,4 +1284,4 @@ builtin_issubclass(PyObject *module, PyObject *const
*args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=4eb1d06e7e74d91c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bc267a3ce1596f24 input=a9049054013a1b77]*/
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]