View Single Post
Old 12-22-2020, 07:05 AM   #1
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
Template : IF code is correct?

So I looked at the code of the Template function (for build a 'IFELSE') and I just saw the 'IF' code is that:
Code:
def evaluate(self, formatter, kwargs, mi, locals, x, y, re):
    if val:
        return val


It's very strange, it shouldn't rather be :
Code:
def evaluate(self, formatter, kwargs, mi, locals, x, y, re):
    if x == y:
        return re
calibre 5.7.2

(I sincerely hope I'm wrong, otherwise there's a very old bug.)
un_pogaz is offline   Reply With Quote