pybind11 icon indicating copy to clipboard operation
pybind11 copied to clipboard

Support arbitrary type in item accessor's subscript operator

Open woodychow opened this issue 3 years ago • 2 comments

Resolves https://github.com/pybind/pybind11/issues/1309

PR made at cielavenir's request.

woodychow avatar Jun 14 '22 03:06 woodychow

@woodychow Seems this change breaks some tests in pypy for some reason.

Skylion007 avatar Jun 14 '22 18:06 Skylion007

  • trying to add tests as https://github.com/pybind/pybind11/pull/4007
  • seems we cannot access py::tuple as object (i.e. PyObject_GetItem) for new ones, unlike PyTuple_GetItem. So I fixed the test accordingly.

[edit] for py2 compatible version, https://github.com/cielavenir/pybind11/actions/workflows/ci.yml runs because the branch name starts from "v", and it seems roughly working ( https://github.com/cielavenir/pybind11/actions/runs/2500434793 ).

cielavenir avatar Jun 15 '22 07:06 cielavenir