Kaydet (Commit) 26db5874 authored tarafından Neil Schemenauer's avatar Neil Schemenauer

str and unicode objects now have a __mod__ slot so don't special case them in

PyNumber_Remainder().  This fixes SF bug #615506 and allows string and unicode
subclasses to override __mod__.
üst 47ec6c07
......@@ -639,12 +639,6 @@ PyNumber_TrueDivide(PyObject *v, PyObject *w)
PyObject *
PyNumber_Remainder(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
return binary_op(v, w, NB_SLOT(nb_remainder), "%");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment