[C++-sig] howto convert a python list to a C++ matrix
David Abrahams
dave at boost-consulting.com
Thu Oct 10 01:16:11 CEST 2002
"Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> writes:
> David preferred to deny my repeated requests to resurrect list::size()
> and tuple::size() (was there in V1). Maybe if someone helps me begging
> we can change his mind for the better. Here is how it works right now:
>
> #include <boost/python/detail/api_placeholder.hpp>
>
> l = boost::python::len(your_list);
>
What's wrong with len()? That's how it's spelled in Python.
--
David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com
More information about the Cplusplus-sig
mailing list