[pypy-commit] pypy default: reduce code duplication
cfbolz
noreply at buildbot.pypy.org
Fri Nov 4 10:50:19 CET 2011
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
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
More information about the pypy-commit
mailing list