Commit b19bda43 authored by Marius Wachtler's avatar Marius Wachtler

Handle list self assignment during slicing

parent 7e1ff6cb
......@@ -393,6 +393,9 @@ extern "C" Box* listSetitemSlice(BoxedList* self, BoxedSlice* slice, Box* v) {
sliceIndex(slice->stop, &stop);
sliceIndex(slice->step, &step);
if (self == v) // handle self assignment by creating a copy
v = _listSlice(self, 0, self->size, 1, self->size);
if (step != 1) {
int r = list_ass_ext_slice(self, slice, v);
if (r)
......
......@@ -21,7 +21,7 @@ set -e
set -ux
python -c 'import __future__'
python -c 'import sys; print sys.executable'
pip install bcrypt==1.1.0 python-gflags==2.0 sqlalchemy==1.0.0 Pillow==2.8.1 decorator oauth2client
pip install bcrypt==1.1.0 python-gflags==2.0 sqlalchemy==1.0.0 Pillow==2.8.1 decorator==3.4.2 oauth2client==1.4.11
python -c 'import bcrypt; assert bcrypt.__version__ == "1.1.0"; assert bcrypt.hashpw("password1", "$2a$12$0123456789012345678901").endswith("I1hdtg4K"); print "bcrypt seems to work"'
python -c 'import gflags; print "gflags imports"'
python -c 'import sqlalchemy; print "sqlalchemy imports"'
......
......@@ -5,6 +5,7 @@ l[0] = 1
print l
print l[2]
print l[2L]
l[:] = l
l = range(5)
while l:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment