Changes between Initial Version and Version 1 of Ticket #17664, comment 8


Ignore:
Timestamp:
Jan 25, 2013, 7:00:12 AM (12 years ago)
Author:
Pi Delport

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17664, comment 8

    initial v1  
    1616krzysiumed's analysis of the template evaluation behavior is spot-on.
    1717
    18 I believe the current behavior is broken, regardless of the question of whether templates should raise exceptions or not: if an exception-raising filter like `var|somefilter` is supposed to evaluate to the empty string, then one would in turn expect expressions like `not var|somefilter` and `True or var|somefilter` to interpret the empty string and evaluate to true (or whatever is appropriate), instead of effectively ignoring the intermediate expressions and always evaluating to false, as above.
     18I believe the current behavior is broken, regardless of the question of whether templates should raise exceptions or not. If an exception-raising filter like `var|somefilter` is supposed to evaluate to the empty string, then one would in turn expect expressions like `not var|somefilter` and `True or var|somefilter` to interpret the empty string and evaluate to true (or whatever is appropriate), instead of effectively ignoring the intermediate expressions and always evaluating to false, as above.
Back to Top