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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user