Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r63252:613641427033
Date: 2013-04-11 18:13 -0400
http://bitbucket.org/pypy/pypy/changeset/613641427033/

Log:    move assert for clarity

diff --git a/rpython/rtyper/rlist.py b/rpython/rtyper/rlist.py
--- a/rpython/rtyper/rlist.py
+++ b/rpython/rtyper/rlist.py
@@ -950,9 +950,9 @@
     count = l2.ll_length()
     ll_assert(start >= 0, "l[start:x] = l with unexpectedly negative start")
     ll_assert(start <= l1.ll_length(), "l[start:x] = l with start > len(l)")
+    ll_assert(stop <= l1.ll_length(), "stop cannot be past the end of l1")
     ll_assert(count == stop - start,
                  "setslice cannot resize lists in RPython")
-    ll_assert(stop <= l1.ll_length(), "stop cannot be past the end of l1")
     # XXX ...but it would be easy enough to support if really needed
     ll_arraycopy(l2, l1, 0, start, count)
 ll_listsetslice.oopspec = 'list.setslice(l1, start, stop, l2)'
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to