Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8798 PyROOT Features needed for RDataFrame in 6.16
  3. ROOT-8799

Automatically convert Python iterables into C++ collections

    XMLWordPrintable

    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'))

        Attachments

          Activity

            People

            • Assignee:
              etejedor Enric Tejedor Saavedra
              Reporter:
              dpiparo Danilo Piparo
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                PlannedEnd:
                PlannedStart: