Hacker News new | ask | show | jobs
by dagw 1070 days ago
If all you need/want is to call c++ code from python then pybind11 is the way to go. Cython really comes into its own when you have some existing python code you want to 'port' to a C extension.
1 comments

Thank you! For now I am just binding c++ to Python but I expect/fear the lines might start blurring, so cython might come in handy then.
It’s a little easier to write idiomatic python bindings for a C/C++ library in Cython IMO, because you’re writing the bindings in a language that’s almost python.