Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r61012:059a8feb392c
Date: 2013-02-09 16:53 -0500
http://bitbucket.org/pypy/pypy/changeset/059a8feb392c/

Log:    more updates to lib_pypy/_collections.py from raymondh

diff --git a/lib_pypy/_collections.py b/lib_pypy/_collections.py
--- a/lib_pypy/_collections.py
+++ b/lib_pypy/_collections.py
@@ -157,9 +157,9 @@
 
     def rotate(self, n=1):
         length = len(self)
-        if length == 0:
+        if length <= 1:
             return
-        halflen = (length+1) >> 1
+        halflen = length >> 1
         if n > halflen or n < -halflen:
             n %= length
             if n > halflen:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to