[Zope] sum() produces floats not integers

Dieter Maurer dieter at handshake.de
Mon Sep 15 18:01:02 EDT 2003


Wayne Connolly wrote at 2003-9-14 21:50 -0700:
 > When I sum a column decimals(floats) are returned. ie.
 > 2.0, 3.0. but i only want the integer instead of the
 > trailing ".0"

"int" converts to integer. You may want to combine it with "round"
or "math.ceil/math.floor".


Dieter



More information about the Zope mailing list