Author: Lukas Diekmann <[email protected]>
Branch: list-strategies
Changeset: r47468:174a022afec3
Date: 2011-03-16 09:47 +0100
http://bitbucket.org/pypy/pypy/changeset/174a022afec3/
Log: Two more translation fixes
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -244,8 +244,8 @@
def switch_to_integer_strategy(self, w_list):
items = self.getitems(w_list, unwrapped=True)
- w_list.strategy = self.space.fromcache(IntegerListStrategy)
- w_list.storage = w_list.strategy.cast_to_void_star(items)
+ strategy = w_list.strategy = self.space.fromcache(IntegerListStrategy)
+ w_list.storage = strategy.cast_to_void_star(items)
def wrap(self, intval):
return self.space.wrap(intval)
@@ -417,6 +417,7 @@
def getslice(self, w_list, start, stop, step, length):
if step == 1:
l = self.cast_from_void_star(w_list.storage)
+ assert start >= 0
assert stop >= 0
sublist = l[start:stop]
storage = self.cast_to_void_star(sublist)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit