mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #1717: remove the cmp builtin function, the C-API functions
PyObject_Cmp, PyObject_Compare, and various support functions.
This commit is contained in:
parent
211c625829
commit
f02e0aaafd
8 changed files with 6 additions and 184 deletions
|
@ -228,29 +228,6 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
|
|||
*/
|
||||
#define PyObject_DelAttr(O,A) PyObject_SetAttr((O),(A),NULL)
|
||||
|
||||
PyAPI_FUNC(int) PyObject_Cmp(PyObject *o1, PyObject *o2, int *result);
|
||||
|
||||
/*
|
||||
Compare the values of o1 and o2 using a routine provided by
|
||||
o1, if one exists, otherwise with a routine provided by o2.
|
||||
The result of the comparison is returned in result. Returns
|
||||
-1 on failure. This is the equivalent of the Python
|
||||
statement: result=cmp(o1,o2).
|
||||
|
||||
*/
|
||||
|
||||
/* Implemented elsewhere:
|
||||
|
||||
int PyObject_Compare(PyObject *o1, PyObject *o2);
|
||||
|
||||
Compare the values of o1 and o2 using a routine provided by
|
||||
o1, if one exists, otherwise with a routine provided by o2.
|
||||
Returns the result of the comparison on success. On error,
|
||||
the value returned is undefined. This is equivalent to the
|
||||
Python expression: cmp(o1,o2).
|
||||
|
||||
*/
|
||||
|
||||
/* Implemented elsewhere:
|
||||
|
||||
PyObject *PyObject_Repr(PyObject *o);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue