summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-12 08:10:47 (GMT)
committerGitHub <noreply@github.com>2017-03-12 08:10:47 (GMT)
commit202fda55c2dffe27125703225e5af92254602dc6 (patch)
treeafc430d7fa6bdda7251bb60703ff192b9c8a37e1 /Objects
parent0767ad40bfe83525d2ba290cc6eb7c97ce01cdd6 (diff)
downloadcpython-202fda55c2dffe27125703225e5af92254602dc6.zip
cpython-202fda55c2dffe27125703225e5af92254602dc6.tar.gz
cpython-202fda55c2dffe27125703225e5af92254602dc6.tar.bz2
bpo-24037: Add Argument Clinic converter `bool(accept={int})`. (#485)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytearrayobject.c4
-rw-r--r--Objects/bytesobject.c4
-rw-r--r--Objects/listobject.c4
-rw-r--r--Objects/unicodeobject.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 693da5c..3a80b73 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -1952,7 +1952,7 @@ bytearray_join(PyByteArrayObject *self, PyObject *iterable_of_bytes)
/*[clinic input]
bytearray.splitlines
- keepends: int(c_default="0") = False
+ keepends: bool(accept={int}) = False
Return a list of the lines in the bytearray, breaking at line boundaries.
@@ -1962,7 +1962,7 @@ true.
static PyObject *
bytearray_splitlines_impl(PyByteArrayObject *self, int keepends)
-/*[clinic end generated code: output=4223c94b895f6ad9 input=8ccade941e5ea0bd]*/
+/*[clinic end generated code: output=4223c94b895f6ad9 input=99a27ad959b9cf6b]*/
{
return stringlib_splitlines(
(PyObject*) self, PyByteArray_AS_STRING(self),
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 3b15247..c4ef495 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -2293,7 +2293,7 @@ bytes_decode_impl(PyBytesObject *self, const char *encoding,
/*[clinic input]
bytes.splitlines
- keepends: int(c_default="0") = False
+ keepends: bool(accept={int}) = False
Return a list of the lines in the bytes, breaking at line boundaries.
@@ -2303,7 +2303,7 @@ true.
static PyObject *
bytes_splitlines_impl(PyBytesObject *self, int keepends)
-/*[clinic end generated code: output=3484149a5d880ffb input=7f4aac67144f9944]*/
+/*[clinic end generated code: output=3484149a5d880ffb input=a8b32eb01ff5a5ed]*/
{
return stringlib_splitlines(
(PyObject*) self, PyBytes_AS_STRING(self),
diff --git a/Objects/listobject.c b/Objects/listobject.c
index b0e58bf..9c1c9d9 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -1968,14 +1968,14 @@ list.sort
*
key as keyfunc: object = None
- reverse: int(c_default="0") = False
+ reverse: bool(accept={int}) = False
Stable sort *IN PLACE*.
[clinic start generated code]*/
static PyObject *
list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse)
-/*[clinic end generated code: output=57b9f9c5e23fbe42 input=5029c13c9209d86a]*/
+/*[clinic end generated code: output=57b9f9c5e23fbe42 input=b0fcf743982c5b90]*/
{
MergeState ms;
Py_ssize_t nremaining;
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index d5cf954..503a59e 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -13089,7 +13089,7 @@ unicode_rsplit_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit)
/*[clinic input]
str.splitlines as unicode_splitlines
- keepends: int(c_default="0") = False
+ keepends: bool(accept={int}) = False
Return a list of the lines in the string, breaking at line boundaries.
@@ -13099,7 +13099,7 @@ true.
static PyObject *
unicode_splitlines_impl(PyObject *self, int keepends)
-/*[clinic end generated code: output=f664dcdad153ec40 input=d6ff99fe43465b0f]*/
+/*[clinic end generated code: output=f664dcdad153ec40 input=b508e180459bdd8b]*/
{
return PyUnicode_Splitlines(self, keepends);
}