mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
make bytes(o) respect __bytes__ #2415
This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject. Reviewer: Barry
This commit is contained in:
parent
a786b026c9
commit
c15a07333e
8 changed files with 83 additions and 2 deletions
|
@ -423,6 +423,7 @@ PyAPI_FUNC(void) _PyObject_Dump(PyObject *);
|
|||
PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyObject_ASCII(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyObject_Bytes(PyObject *);
|
||||
PyAPI_FUNC(int) PyObject_Compare(PyObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
|
||||
PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue