From: Armin Ronacher Date: Tue, 6 Mar 2007 11:51:31 +0000 (+0100) Subject: [svn] added negation to designer docs X-Git-Tag: 2.0rc1~456 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0cd0d9ae12f74a4422b1d072deae08cfcf22b8b5;p=jinja2.git [svn] added negation to designer docs --HG-- branch : trunk --- diff --git a/docs/src/designerdoc.txt b/docs/src/designerdoc.txt index 8856850..9da6c81 100644 --- a/docs/src/designerdoc.txt +++ b/docs/src/designerdoc.txt @@ -251,12 +251,18 @@ can use Expressions. In expressions you can use any of the following operators: filters for more information. ``and`` return true if the left and the right operand is true. ``or`` return true if the left or the right operand is true. + ``not`` negate an statement * ``()`` call a callable. ``{{ user.get_username() }}``. Inside of the parenthesis you can use variables: ``{{ user.get('username') }}``. ======= =================================================================== Note that there is no support for any bit operation or something similar. +* special note regarding `not`. The `is` and `in` operators support negation + using an infix notation too: ``foo is not bar`` and ``foo not in bar`` + instead of ``not foo is bar`` and ``not foo in bar``. All other expressions + require a prefix notation: ``not (foo and bar)``. + Macros ======