[pypy-svn] r59088 - pypy/trunk/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Tue Oct 14 13:54:40 CEST 2008
Author: arigo
Date: Tue Oct 14 13:54:40 2008
New Revision: 59088
Modified:
pypy/trunk/pypy/objspace/std/sliceobject.py
Log:
(antocuni around, arigo)
Tweak to let the annotator prove that start >= 0.
Modified: pypy/trunk/pypy/objspace/std/sliceobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/sliceobject.py (original)
+++ pypy/trunk/pypy/objspace/std/sliceobject.py Tue Oct 14 13:54:40 2008
@@ -88,10 +88,10 @@
# * start <= stop
start = space.int_w(w_start)
stop = space.int_w(w_stop)
- if start < 0:
- start = 0
if start > length:
start = length
+ if start < 0:
+ start = 0
if stop < start:
stop = start
return start, stop
More information about the Pypy-commit
mailing list