Commits

Brian Kearns committed 059a8fe

more updates to lib_pypy/_collections.py from raymondh

Comments (0)

Files changed (1)

lib_pypy/_collections.py

 
     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: