Remove special handling of str and unicode in PyNumber_InPlaceRemainder. They

both have a nb_remainer slot.
This commit is contained in:
Neil Schemenauer 2002-11-24 01:07:42 +00:00
parent 761b6095bd
commit d46fbc322d

View file

@ -764,15 +764,8 @@ PyNumber_InPlaceMultiply(PyObject *v, PyObject *w)
PyObject *
PyNumber_InPlaceRemainder(PyObject *v, PyObject *w)
{
if (PyString_Check(v))
return PyString_Format(v, w);
#ifdef Py_USING_UNICODE
else if (PyUnicode_Check(v))
return PyUnicode_Format(v, w);
#endif
else
return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
NB_SLOT(nb_remainder), "%=");
return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
NB_SLOT(nb_remainder), "%=");
}
PyObject *