let FloatValue always correspond to True

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3322 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2009-04-03 09:49:30 +00:00
parent d82704e17e
commit eaad1ce9bd

View file

@ -118,6 +118,10 @@ class BaseObject(object):
class FloatValue(float):
# TODO: rename to CurrencyValue
def __nonzero__(self):
return True # even when value is 0.0
def __init__(self, value, decimals=2, currency=u''):
self.decimals = decimals