diff --git a/include/boost/python/indexing/vector_indexing_suite.hpp b/include/boost/python/indexing/vector_indexing_suite.hpp index 76cb7532..f054c6f8 100644 --- a/include/boost/python/indexing/vector_indexing_suite.hpp +++ b/include/boost/python/indexing/vector_indexing_suite.hpp @@ -64,7 +64,7 @@ namespace boost { namespace python { static object get_slice(Container& container, index_type from, index_type to) { - return object(Container(container.begin(), container.end())); + return object(Container(container.begin()+from, container.begin()+to)); } static void diff --git a/test/vector_indexing_suite.py b/test/vector_indexing_suite.py index 39d0dd06..e177aeea 100644 --- a/test/vector_indexing_suite.py +++ b/test/vector_indexing_suite.py @@ -111,8 +111,8 @@ foo ##################################################################### >>> sl = v[0:2] ->>> print_xvec(v) -[ yaba c d foo ] +>>> print_xvec(sl) +[ yaba c ] >>> sl[0].reset() >>> sl[0] reset