[C++-sig] len function?

Luca Sbardella luca.sbardella at gmail.com
Wed Jun 13 19:25:51 CEST 2007


boost::python::list lis;
using namespace boost::python;
unsigned N = extract<unsigned>(lis.attr("__len__")());

On 13/06/07, Ron Brown, Jr. <rbrown at gamry.com> wrote:
>
> This is probably a ridiculous question, but how do I find the length of
> a boost::python::list object?  I can't seem to find a straightforward
> answer in any of my searches.
>
> Thanks,
>
>
> Ron
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070613/8cd0b96f/attachment.htm>


More information about the Cplusplus-sig mailing list