Fix the NOT function.

This commit is contained in:
Charles Haley 2011-06-04 15:04:20 +01:00
parent da9aef6c58
commit 87c178accb

View File

@ -727,13 +727,8 @@ class BuiltinNot(BuiltinFormatterFunction):
'returns the empty string. This function works well with test or '
'first_non_empty. You can have as many values as you want.')
def evaluate(self, formatter, kwargs, mi, locals, *args):
i = 0
while i < len(args):
if args[i]:
return '1'
i += 1
return ''
def evaluate(self, formatter, kwargs, mi, locals, val):
return '' if val else '1'
class BuiltinMergeLists(BuiltinFormatterFunction):
name = 'merge_lists'