diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-11-18 16:04:52 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-11-18 16:04:52 (GMT) |
commit | 26db587485ea4e133e8de35aa6ab61f6c51fd993 (patch) | |
tree | abeb4fcde27d5727f68c23318ba183c4dbc14013 | |
parent | 47ec6c079087740eb73c1df0499743e6b931d89f (diff) | |
download | cpython-26db587485ea4e133e8de35aa6ab61f6c51fd993.zip cpython-26db587485ea4e133e8de35aa6ab61f6c51fd993.tar.gz cpython-26db587485ea4e133e8de35aa6ab61f6c51fd993.tar.bz2 |
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__.
-rw-r--r-- | Objects/abstract.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 4f8dd3e..2df934d 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -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), "%"); } |