+ extend number protocol

This commit is contained in:
wmayer
2014-02-14 13:45:56 +01:00
parent 98bab1ebbe
commit e916d65a5c
4 changed files with 10 additions and 15 deletions

View File

@@ -594,8 +594,7 @@ PyObject * VectorPy::number_absolute_handler (PyObject *self)
int VectorPy::number_nonzero_handler (PyObject *self)
{
PyErr_SetString(PyExc_NotImplementedError, "Not implemented");
return 0;
return 1;
}
PyObject * VectorPy::number_invert_handler (PyObject *self)
@@ -637,7 +636,7 @@ PyObject * VectorPy::number_or_handler (PyObject *self, PyObject *other)
int VectorPy::number_coerce_handler (PyObject **self, PyObject **other)
{
PyErr_SetString(PyExc_NotImplementedError, "Not implemented");
return 0;
return 1;
}
PyObject * VectorPy::number_int_handler (PyObject *self)