Does pybind11 default arugments expression been called every time when the python API invoked? #3594
Unanswered
linrongbin16
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to add an expression as default arguments to my python function API, which is implemented by pybind11.
For example, here's the C++ function:
Now I'm wonderring that, the expression
= std::chrono::system_clock::now()
, I want it been called everytime I invoke thismy_print
API in python script.But I'm not sure, is this expression been called everytime this API been invoked in python ? Or this expression is only been called once when this python module been load in python ?
Beta Was this translation helpful? Give feedback.
All reactions