The Indexing Suite V2's boost::python::indexing::map_suite class throws a ValueError exception when the wrapped std::map instance's __getitem__ method is called with a key value that the std::map doesn't contain.
Since a Python dict object's __getitem__ method throws a KeyError exception when it's called with a key value that it doesn't contain, the boost::python::indexing::map_suite class' implementation of __getitem__ should throw a KeyError exception as well.
The error is on line 499 of indexing_suite/algorithms.hpp:
template<typename ContainerTraits, typename Ovr>
BOOST_DEDUCED_TYPENAME assoc_algorithms<ContainerTraits, Ovr>::iterator
container &c, index_param ix)
iterator iter = most_derived::find (c, ix);
if (iter == most_derived::end(c))
PyExc_ValueError, "associative container: key not found");
This bug was found in revision 1856.
Log in to post a comment.