[pypy-commit] pyrepl py3k-readline: we need to explicitly use integer division here
antocuni
noreply at buildbot.pypy.org
Fri Oct 26 11:19:28 CEST 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
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
More information about the pypy-commit
mailing list