12 #ifndef _RD_PYSEQUENCEHOLDER_H_
13 #define _RD_PYSEQUENCEHOLDER_H_
21 namespace python = boost::python;
41 unsigned int size()
const {
44 res = python::extract<int>(d_seq.attr(
"__len__")());
46 throw_value_error(
"sequence does not support length query");
64 throw_index_error(which);
68 T res = python::extract<T>(d_seq[which]);
71 throw_value_error(
"cannot extract desired type from sequence");
75 return static_cast<T
>(T());