[C++-sig] boost::python::dict problem

Ravi lists_ravi at lavabit.com
Thu Oct 2 15:18:23 CEST 2008


On Wednesday 01 October 2008 19:07:58 Littil Dummy wrote:
> I don't get why "1,17" evaluates to 17 in c++.

Try the following (untested):

#include <iostream>
int main( int char *[] )
{
  std::cout << 17 << " " << (1,17) << " " << (2,4,18) << std::endl;
}

> And if it does... this still doesn't explain why the dict contained 255*255
> = 65000 =len(testdict) entries in C++ but only 255 entries when querying
> the length of it from within python. Removed duplicates?

Yes.

Regards,
Ravi





More information about the Cplusplus-sig mailing list