Author: Carl Friedrich Bolz <[email protected]>
Branch: 
Changeset: r48729:7c022d2fff84
Date: 2011-11-03 20:29 +0100
http://bitbucket.org/pypy/pypy/changeset/7c022d2fff84/

Log:    reduce code duplication

diff --git a/pypy/objspace/std/slicetype.py b/pypy/objspace/std/slicetype.py
--- a/pypy/objspace/std/slicetype.py
+++ b/pypy/objspace/std/slicetype.py
@@ -34,11 +34,7 @@
     return index
 
 def adapt_bound(space, size, w_index):
-    index = eval_slice_index(space, w_index)
-    if index < 0:
-        index = index + size
-        if index < 0:
-            index = 0
+    index = adapt_lower_bound(space, size, w_index)
     if index > size:
         index = size
     assert index >= 0
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to