[ https://issues.apache.org/jira/browse/ARROW-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16448790#comment-16448790 ]
Antoine Pitrou commented on ARROW-2499: --------------------------------------- That would be nice. Otherwise I might end up writing a {{for_each}}-like primitive, something like: {code:cpp} // Iterate on the Python sequence, calling the given callable on each element. // If the callable returns a non-OK status, iteration stops and the status is returned. Status IterateSequence(PyObject*, const std::function<Status(PyObject*)>&); {code} > [C++] Add iterator facility for Python sequences > ------------------------------------------------ > > Key: ARROW-2499 > URL: https://issues.apache.org/jira/browse/ARROW-2499 > Project: Apache Arrow > Issue Type: Wish > Components: C++ > Reporter: Antoine Pitrou > Priority: Major > > The idea is to factor out something like the following: > https://github.com/apache/arrow/pull/1935/files#diff-6ea0fcd65b95b76eab9ddfbd7a173725R78 > However I'm not sure which idiom or pattern we should choose. [~cpcloud] any > idea? -- This message was sent by Atlassian JIRA (v7.6.3#76005)