Details
-
Type:
Sub-task
-
Status: Closed (View Workflow)
-
Priority:
Medium
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: 6.22/00
-
Component/s: PyROOT
-
Labels:None
-
Environment:
all
-
Development:
Description
Often C++ new interfaces receive lists of parameters in the form vectors or lists. It would be nice to have automatic conversion of python lists to this kind of collections.
For example:
myFunction(const vector<string>& v );
|
This would be called like this in C++
myFunction({"a", "b", "c"});
|
In Pyhon currently this has to be called like this
v = ROOT.vector('string')()
|
v.push_back('a')
|
v.push_back('b')
|
v.push_back('c')
|
myFunction(v)
|
It would be nice to be able to do
myFunction(['a','b','c'])
|
# or
|
myFunction(('a','b','c'))
|