2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

Fixed get_slice

[SVN r19421]
This commit is contained in:
Joel de Guzman
2003-08-04 05:09:23 +00:00
parent 0922aca873
commit 1f715958f9
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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