diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-12-03 19:52:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 19:52:21 (GMT) |
commit | a87c46eab3c306b1c5b8a072b7b30ac2c50651c0 (patch) | |
tree | 92c0ebdb6abd303ea967c0bd999d839a98f84494 /Objects/bytesobject.c | |
parent | c68573b339320409b038501fdd7d4f8a56766275 (diff) | |
download | cpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.zip cpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.tar.gz cpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.tar.bz2 |
bpo-15999: Accept arbitrary values for boolean parameters. (#15609)
builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index a63f396..0fd10fa 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2314,7 +2314,7 @@ bytes_decode_impl(PyBytesObject *self, const char *encoding, /*[clinic input] bytes.splitlines - keepends: bool(accept={int}) = False + keepends: bool = False Return a list of the lines in the bytes, breaking at line boundaries. @@ -2324,7 +2324,7 @@ true. static PyObject * bytes_splitlines_impl(PyBytesObject *self, int keepends) -/*[clinic end generated code: output=3484149a5d880ffb input=a8b32eb01ff5a5ed]*/ +/*[clinic end generated code: output=3484149a5d880ffb input=5d7b898af2fe55c0]*/ { return stringlib_splitlines( (PyObject*) self, PyBytes_AS_STRING(self), |