Author: Antonio Cuni <[email protected]>
Branch: py3k-readline
Changeset: r201:c385792628a7
Date: 2012-10-26 11:19 +0200
http://bitbucket.org/pypy/pyrepl/changeset/c385792628a7/

Log:    we need to explicitly use integer division here

diff --git a/pyrepl/completing_reader.py b/pyrepl/completing_reader.py
--- a/pyrepl/completing_reader.py
+++ b/pyrepl/completing_reader.py
@@ -67,8 +67,8 @@
         item = "%s  "
         padding = 2
     maxlen = min(max(map(real_len, wordlist)), cons.width - padding)
-    cols = cons.width / (maxlen + padding)
-    rows = (len(wordlist) - 1)/cols + 1
+    cols = cons.width // (maxlen + padding)
+    rows = (len(wordlist) - 1)//cols + 1
 
     if sort_in_column:
         # sort_in_column=False (default)     sort_in_column=True
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to