
9 Mar
2011
9 Mar
'11
10:33 p.m.
Hello, Given a boost::python object, how can I the difference between that object containing a string, or a sequence of length 1 whos zeroeth element is a string? Ie: "foo" --vs-- ["foo"] bp::extract<std::string> succeeds in both cases. I can use PySequence_Check to test for a sequence, and then I can test the length of the zeroeth element - if >1 then it's ["foo"] - but then I still can't disambiguate ["X"]. tia! Allan