4 #include <boost/python/errors.hpp> 15 size_t index = (size_t) _index;
17 index = (size_t) (n + _index);
21 ss <<
"Index " << _index <<
" out of range";
22 PyErr_SetString(PyExc_IndexError, ss.str().c_str());
23 boost::python::throw_error_already_set();
static size_t handlePythonIndex(long _index, size_t n)
Translate received index from python, where negative values have a special meaning (i...
Definition: PyHeliosUtils.h:14
Definition: PyHeliosUtils.h:6