In the Python library, I'd like to override __getitem__ on container objects in a way that allows slicing. Right now, this is soft blocked on pybind/pybind11#1095. I could not try to use py::slice from Pybind11 and instead write my own custom type mapper at the libpython level, but I'd rather use py::slice and for now, this can be worked around in the Python interface by calling the container to get its contents and slicing those.
- What we have to do today:
document()[1:] or document.contents[1:]
- What I'd like to do instead:
document[1:]