Joel Andersson
2016-02-20 19:02:37 UTC
Hello,
Is there a clean way (e.g. a feature) to mark that a function should have
variable number of arguments on the Python side, but not on the C/C++ side?
My use case is a function that takes an std::vector<MyClass> on the C++
side, but on the Python side, the natural syntax is to pass a variable
number of inputs.
That is, generate a function such as:
def mywrapper(*arg):
...
instead of
def mywrapper(arg):
...
Best regards,
Joel
Is there a clean way (e.g. a feature) to mark that a function should have
variable number of arguments on the Python side, but not on the C/C++ side?
My use case is a function that takes an std::vector<MyClass> on the C++
side, but on the Python side, the natural syntax is to pass a variable
number of inputs.
That is, generate a function such as:
def mywrapper(*arg):
...
instead of
def mywrapper(arg):
...
Best regards,
Joel