[web] integer division
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 12 Oct 2015 18:43:05 +0200
changeset 10783 02cc22d7d339
parent 10782 65bb683d2a51
child 10784 21bb9a00adeb
[web] integer division
web/formwidgets.py
--- a/web/formwidgets.py	Mon Oct 12 18:42:38 2015 +0200
+++ b/web/formwidgets.py	Mon Oct 12 18:43:05 2015 +0200
@@ -418,7 +418,7 @@
         lines = value.splitlines()
         linecount = len(lines)
         for line in lines:
-            linecount += len(line) / self._columns
+            linecount += len(line) // self._columns
         attrs.setdefault('cols', self._columns)
         attrs.setdefault('rows', min(self._maxrows, linecount + self._minrows))
         return tags.textarea(value, name=field.input_name(form, self.suffix),