implement true divide handler of the number protocol for Quantity

This commit is contained in:
wmayer
2018-10-27 15:27:27 +02:00
parent 7ec3984cbe
commit 83f61b4372
5 changed files with 11 additions and 10 deletions

View File

@@ -672,7 +672,6 @@ int VectorPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
// In generation script allow to more precisely define which slots
// of the number protocol should be supported instead of setting all.
#if PY_MAJOR_VERSION < 3
PyObject * VectorPy::number_divide_handler (PyObject* self, PyObject* other)
{
if (PyObject_TypeCheck(self, &(VectorPy::Type)) &&
@@ -702,7 +701,6 @@ PyObject * VectorPy::number_divide_handler (PyObject* self, PyObject* other)
Py_TYPE(self)->tp_name, Py_TYPE(other)->tp_name);
return 0;
}
#endif
PyObject * VectorPy::number_remainder_handler (PyObject* self, PyObject* other)
{