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