Fix Version/s: None
In order to synthesis __iter__ from __getitem__ Python apparently requires exactly IndexError to be thrown, so that's what we should throw in these functions.
That will require rewriting the testPybind11.cc unit test in a way that has access to Python symbols (which should be done anyway).
There will likely be workaround code in afw/table/python/catalog.h that can be cleaned up after this change (I'll just catch OutOfRangeError there and re-throw as IndexError).
For simplicity I wrapped cppIndex with pybind11 and moved the unit test into Python (in testPybind11.py).
If any one of you has time to review this please delete the other two reviewers and take it. It's very small: changes to python.h, adding a simple python.cc file and moving test code from pybind11.cc (now gone) to pybind11.py
afw now has several more workarounds. Please grep for "
DM-9715" to catch them all.