Segfault when indexing nested pybind11::list in C++ #4945
Answered
by
ascended121
ascended121
asked this question in
Q&A
-
In a test (implemented in GTest), I'm trying to index a nested list, like so:
The indexing operation segfaults with the following backtrace:
Am I doing something wrong here? Or is this a bug in pybind11? |
Beta Was this translation helpful? Give feedback.
Answered by
ascended121
Nov 30, 2023
Replies: 1 comment 3 replies
-
Operator [] return list_accessor which has no [] operator. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, so the key is you have to use python ints for the indices. Thanks!