You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:]
The text was updated successfully, but these errors were encountered:
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 usepy::slice
from Pybind11 and instead write my own custom type mapper at the libpython level, but I'd rather usepy::slice
and for now, this can be worked around in the Python interface by calling the container to get its contents and slicing those.document()[1:]
ordocument.contents[1:]
document[1:]
The text was updated successfully, but these errors were encountered: