From e6e5263b452523cc42ddfcfd1d10552a03b68390 Mon Sep 17 00:00:00 2001 From: helmutm Date: Mon, 28 Sep 2009 09:32:26 +0000 Subject: [PATCH] provide additional functions for accessing float values git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3561 fd906abe-77d9-0310-91a1-e0d9ade77398 --- commerce/common.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/commerce/common.py b/commerce/common.py index 816bfc6..c97c315 100644 --- a/commerce/common.py +++ b/commerce/common.py @@ -134,6 +134,13 @@ class FloatValue(float): value = value + ' ' + self.currency return value + def rawValue(self): + return float(self) + + def rawFormatted(self): + format = '%%.%if' % self.decimals + return (format % self) + # utility functions