Author: Amaury Forgeot d'Arc <[email protected]>
Branch: 
Changeset: r58762:eeb72e9c56e0
Date: 2012-11-06 00:28 +0100
http://bitbucket.org/pypy/pypy/changeset/eeb72e9c56e0/

Log:    This assert seems necessary, to prove that rbigint.size is always
        positive.

diff --git a/pypy/rlib/rbigint.py b/pypy/rlib/rbigint.py
--- a/pypy/rlib/rbigint.py
+++ b/pypy/rlib/rbigint.py
@@ -845,7 +845,8 @@
 
         while i > 1 and self._digits[i - 1] == NULLDIGIT:
             i -= 1
-        
+        assert i > 0
+
         if i != self.numdigits():
             self.size = i
         if self.numdigits() == 1 and self._digits[0] == NULLDIGIT:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to