pybind / pybind11

Seamless operability between C++11 and Python
https://pybind11.readthedocs.io/
Other
15.09k stars 2.05k forks source link

[BUG]: Disappearing return value #5209

Closed suixin1424 closed 4 days ago

suixin1424 commented 4 days ago

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

v2.13

Problem description

i define a method in a class and it works well when it's content is below: image but, as long as i add this line, it break and return nothing not even None type: image i troubleshoot the problem as follow, and it successfully print the number 0: image

Reproducible example code

No response

Is this a regression? Put the last known working version here if it is.

Not a regression