diff options
author | Dong-hee Na <donghee.na@python.org> | 2021-08-23 10:01:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 10:01:51 (GMT) |
commit | 24b63c695ae0a95b06379eaadace66735abac1e2 (patch) | |
tree | 8bc8bbc38511c504860b494e125c232f51457638 /Objects/clinic | |
parent | 6082bb5addab93755ab6e2bd2ed6021b391e10d1 (diff) | |
download | cpython-24b63c695ae0a95b06379eaadace66735abac1e2.zip cpython-24b63c695ae0a95b06379eaadace66735abac1e2.tar.gz cpython-24b63c695ae0a95b06379eaadace66735abac1e2.tar.bz2 |
bpo-24234: Implement bytes.__bytes__ (GH-27901)
Diffstat (limited to 'Objects/clinic')
-rw-r--r-- | Objects/clinic/bytesobject.c.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 9e365ce..103a364 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -2,6 +2,24 @@ preserve [clinic start generated code]*/ +PyDoc_STRVAR(bytes___bytes____doc__, +"__bytes__($self, /)\n" +"--\n" +"\n" +"Convert this value to exact type bytes."); + +#define BYTES___BYTES___METHODDEF \ + {"__bytes__", (PyCFunction)bytes___bytes__, METH_NOARGS, bytes___bytes____doc__}, + +static PyObject * +bytes___bytes___impl(PyBytesObject *self); + +static PyObject * +bytes___bytes__(PyBytesObject *self, PyObject *Py_UNUSED(ignored)) +{ + return bytes___bytes___impl(self); +} + PyDoc_STRVAR(bytes_split__doc__, "split($self, /, sep=None, maxsplit=-1)\n" "--\n" @@ -878,4 +896,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=b3f0ec2753246b9c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d706344859f40122 input=a9049054013a1b77]*/ |