If I remember correctly there is a len() function on the boost::python::object class.
len() is documented at the bottom of this page . . . https://www.boost.org/doc/libs/1_66_0/libs/python/doc/html/reference/object_wrappers/boost_python_object_hpp.html I can’t help with the ambiguity. From: Cplusplus-sig <cplusplus-sig-bounces+torrin.jones=baesystems....@python.org> On Behalf Of HOUSSEN Franck Sent: Wednesday, January 29, 2020 1:02 PM To: cplusplus-sig@python.org Subject: [C++-sig] With boost python tuple, how to loop over tuple items? *** WARNING *** EXTERNAL EMAIL -- This message originates from outside our organization. With boost python tuple, how to loop over tuple items? In dummy.cpp attached, I'd like to get line 8 to work. Afterwards, I noticed line 7 does not even compile. How to get the length of a tuple (line 8), and, why there could be some ambiguity (line 7). Any help / clue is appreciated. Franck
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig