discriminate against None, not False-ish values stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 03 Feb 2010 16:19:12 +0100
branchstable
changeset 4435 3e253ad89468
parent 4433 dccf8e5eb79e
child 4452 5d6dec2c4650
discriminate against None, not False-ish values
appobject.py
--- a/appobject.py	Wed Feb 03 10:55:25 2010 +0100
+++ b/appobject.py	Wed Feb 03 16:19:12 2010 +0100
@@ -525,9 +525,8 @@
 
     def format_float(self, num):
         """return a string for floating point number according to instance's
-        configuration
-        """
-        if num:
+        configuration """
+        if num is not None:
             return self.req.property_value('ui.float-format') % num
         return u''