mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-21 06:05:32 +08:00
object_api::operator[] has a powerful overload for py::handle that can accept slices, tuples (for NumPy), etc. Lists, sequences, and tuples provide their own specialized operator[], which unfortunately disables this functionality. This is accidental, and the purpose of this commit is to re-enable the more general behavior. This commit is tangentially related to the previous one in that it makes py::handle/py::object et al. behave more like their Python counterparts.