
 `Tc        	   @   sU  d  Z  d d l Z d d l m Z d d l m Z d d l m Z m Z m	 Z	 m
 Z
 m Z m Z e e f Z i e j d 6e j d 6e j d 6e j d	 6e j d
 6e j d 6e j d 6Z i e j d 6e j d 6e j d 6Z i e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6d   d 6d   d 6Z  d e! f d     YZ" d e# f d     YZ$ d e% f d     YZ& d   Z' d e	 e$ e%  f d      YZ( d! e( f d"     YZ) d# e( f d$     YZ* d% e( f d&     YZ+ d' e) f d(     YZ, d) e) f d*     YZ- d+ e) f d,     YZ. d- e) f d.     YZ/ d/ e) f d0     YZ0 d1 e) f d2     YZ1 d3 e) f d4     YZ2 d5 e) f d6     YZ3 d7 e) f d8     YZ4 d9 e) f d:     YZ5 d; e) f d<     YZ6 d= e) f d>     YZ7 d? e) f d@     YZ8 dA e( f dB     YZ9 dC e9 f dD     YZ: dE e9 f dF     YZ; dG e9 f dH     YZ< dI e9 f dJ     YZ= dK e= f dL     YZ> dM e= f dN     YZ? dO e= f dP     YZ@ dQ e= f dR     YZA dS e= f dT     YZB dU e* f dV     YZC dW e* f dX     YZD dY e9 f dZ     YZE d[ e9 f d\     YZF d] e9 f d^     YZG d_ e9 f d`     YZH da e9 f db     YZI dc e9 f dd     YZJ de e9 f df     YZK dg e9 f dh     YZL di e9 f dj     YZM dk e* f dl     YZN eN j  dm dn jO eP do   eQ e  eQ e  BeQ e   BD   7_  dp e: f dq     YZR dr e: f ds     YZS dt e: f du     YZT dv e: f dw     YZU dx e: f dy     YZV dz e: f d{     YZW d| e: f d}     YZX d~ e: f d     YZY d e: f d     YZZ d e; f d     YZ[ d e; f d     YZ\ d e; f d     YZ] d e9 f d     YZ^ d e9 f d     YZ_ d e9 f d     YZ` d e9 f d     YZa d e9 f d     YZb d e9 f d     YZc d e9 f d     YZd d e) f d     YZe d e) f d     YZf d e) f d     YZg d e) f d     YZh d eh f d     YZi d   Zj ek ej  e$ _l [j d S(   s}  
    jinja2.nodes
    ~~~~~~~~~~~~

    This module implements additional nodes derived from the ast base node.

    It also provides some node tree helper functions like `in_lineno` and
    `get_nodes` used by the parser and translator in order to normalize
    python and jinja nodes.

    :copyright: (c) 2010 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
iN(   t   deque(   t   Markup(   t   nextt   izipt   with_metaclasst	   text_typet   method_typet   function_typet   *t   /s   //s   **t   %t   +t   -t   nott   eqt   net   gtt   gteqt   ltt   lteqc         C   s
   |  | k S(   N(    (   t   at   b(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   <lambda>2   s    t   inc         C   s
   |  | k S(   N(    (   R   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   3   s    t   notint
   Impossiblec           B   s   e  Z d  Z RS(   s8   Raised if the node could not perform a requested action.(   t   __name__t
   __module__t   __doc__(    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   7   s   t   NodeTypec           B   s   e  Z d  Z d   Z RS(   s   A metaclass for nodes that handles the field and attribute
    inheritance.  fields and attributes from the parent class are
    automatically forwarded to the child.c         C   s   x d D] } g  } | j  t | d | d	   | j  | j | d
   t |  d k sg t d   t |  t t |   k s t d   t |  | | <q W| j d t  t	 j
 |  | | |  S(   Nt   fieldst
   attributesi    i   s    multiple inheritance not alloweds   layout conflictt   abstract(   s   fieldss
   attributes(    (    (   t   extendt   getattrt   gett   lent   AssertionErrort   sett   tuplet
   setdefaultt   Falset   typet   __new__(   t   clst   namet   basest   dt   attrt   storage(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR+   @   s    *(   R   R   R   R+   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   ;   s   t   EvalContextc           B   s,   e  Z d  Z d d  Z d   Z d   Z RS(   sc   Holds evaluation time information.  Custom attributes can be attached
    to it in extensions.
    c         C   sF   | |  _  t | j  r- | j |  |  _ n | j |  _ t |  _ d  S(   N(   t   environmentt   callablet
   autoescapeR)   t   volatile(   t   selfR3   t   template_name(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   __init__Q   s
    	c         C   s   |  j  j   S(   N(   t   __dict__t   copy(   R7   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   saveY   s    c         C   s!   |  j  j   |  j  j |  d  S(   N(   R:   t   cleart   update(   R7   t   old(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   revert\   s    N(   R   R   R   t   NoneR9   R<   R@   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR2   L   s   	c         C   s;   | d  k r7 |  j d  k r* t d   n  t |  j  S| S(   NsI   if no eval context is passed, the node must have an attached environment.(   RA   R3   t   RuntimeErrorR2   (   t   nodet   ctx(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   get_eval_contexta   s
    t   Nodec           B   s   e  Z d  Z d Z d Z e Z d   Z d d d  Z	 d d d  Z
 d   Z d   Z d   Z e d	  Z d
   Z d   Z d   Z e j Z d   Z RS(   s  Baseclass for all Jinja2 nodes.  There are a number of nodes available
    of different types.  There are four major types:

    -   :class:`Stmt`: statements
    -   :class:`Expr`: expressions
    -   :class:`Helper`: helper nodes
    -   :class:`Template`: the outermost wrapper node

    All nodes have fields and attributes.  Fields may be other nodes, lists,
    or arbitrary values.  Fields are passed to the constructor as regular
    positional arguments, attributes as keyword arguments.  Each node has
    two attributes: `lineno` (the line number of the node) and `environment`.
    The `environment` attribute is set at the end of the parsing process for
    all nodes automatically.
    t   linenoR3   c      	   O   s0  |  j  r t d   n  | r t |  t |  j  k r |  j s[ t d |  j j   n  t d |  j j t |  j  t |  j  d k r d p d f   n  x3 t |  j |  D] \ } } t |  | |  q Wn  x- |  j D]" } t |  | | j	 | d    q W| r,t d t t |     n  d  S(   Ns#   abstract nodes are not instanciables   %r takes 0 argumentss   %r takes 0 or %d argument%si   t   st    s   unknown attribute %r(   R    t	   TypeErrorR$   R   t	   __class__R   R   t   setattrR   t   popRA   R   t   iter(   R7   R   R   R-   t   argR0   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR9      s$    			+ c         c   s   x |  j  D] } | | k o' d k n s\ | d k	 rD | | k s\ | d k	 r
 | | k r
 y | t |  |  f VWq t k
 r q Xq
 q
 Wd S(   sZ  This method iterates over all fields that are defined and yields
        ``(key, value)`` tuples.  Per default all fields are returned, but
        it's possible to limit that to some fields by providing the `only`
        parameter or to exclude some using the `exclude` parameter.  Both
        should be sets or tuples of field names.
        N(   R   RA   R"   t   AttributeError(   R7   t   excludet   onlyR-   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   iter_fields   s    c         c   sx   xq |  j  | |  D]] \ } } t | t  rY x? | D] } t | t  r5 | Vq5 q5 Wq t | t  r | Vq q Wd S(   s   Iterates over all direct child nodes of the node.  This iterates
        over all fields and yields the values of they are nodes.  If the value
        of a field is a list all the nodes in that list are returned.
        N(   RS   t
   isinstancet   listRF   (   R7   RQ   RR   t   fieldt   itemt   n(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   iter_child_nodes   s    c         C   s   x |  j  |  D] } | SWd S(   si   Find the first node of a given type.  If no such node exists the
        return value is `None`.
        N(   t   find_all(   R7   t	   node_typet   result(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   find   s    c         c   sQ   xJ |  j    D]< } t | |  r* | Vn  x | j |  D] } | Vq: Wq Wd S(   s   Find all the nodes of a given type.  If the type is a tuple,
        the check is performed for any of the tuple items.
        N(   RY   RT   RZ   (   R7   R[   t   childR\   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRZ      s
    c         C   sZ   t  |  g  } xD | rU | j   } d | j k r? | | _ n  | j | j    q W|  S(   s  Reset the context of a node and all child nodes.  Per default the
        parser will all generate nodes that have a 'load' context as it's the
        most common one.  This method is used in the parser to set assignment
        targets and other nodes to a store context.
        RD   (   R    t   popleftR   RD   R!   RY   (   R7   RD   t   todoRC   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   set_ctx   s    	c         C   sr   t  |  g  } x\ | rm | j   } d | j k rW | j d k sH | rW | | _ qW n  | j | j    q W|  S(   s.   Set the line numbers of the node and children.RG   N(   R    R_   R   RG   RA   R!   RY   (   R7   RG   t   overrideR`   RC   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt
   set_lineno   s    	c         C   sH   t  |  g  } x2 | rC | j   } | | _ | j | j    q W|  S(   s"   Set the environment for all nodes.(   R    R_   R3   R!   RY   (   R7   R3   R`   RC   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   set_environment   s    		c         C   s:   t  |   t  |  k o9 t |  j    t | j    k S(   N(   R*   R'   RS   (   R7   t   other(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   __eq__   s    c         C   s   |  j  |  S(   N(   Rf   (   R7   Re   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   __ne__   s    c            s0   d   j  j d j   f d     j D  f S(   Ns   %s(%s)s   , c         3   s+   |  ]! } d  | t    | d  f Vq d S(   s   %s=%rN(   R"   RA   (   t   .0RO   (   R7   (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pys	   <genexpr>   s   (   RK   R   t   joinR   (   R7   (    (   R7   sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   __repr__   s    	(    (   s   linenos   environmentN(   R   R   R   R   R   t   TrueR    R9   RA   RS   RY   R]   RZ   Ra   R)   Rc   Rd   Rf   Rg   t   objectt   __hash__Rj   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRF   k   s    			
						t   Stmtc           B   s   e  Z d  Z e Z RS(   s   Base node for all statements.(   R   R   R   Rk   R    (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRn      s   t   Helperc           B   s   e  Z d  Z e Z RS(   s,   Nodes that exist in a specific context only.(   R   R   R   Rk   R    (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRo      s   t   Templatec           B   s   e  Z d  Z d Z RS(   sj   Node that represents a template.  This must be the outermost node that
    is passed to the compiler.
    t   body(   Rq   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRp      s   t   Outputc           B   s   e  Z d  Z d Z RS(   s   A node that holds multiple expressions which are then printed out.
    This is used both for the `print` statement and the regular template data.
    t   nodes(   s   nodes(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRr     s   t   Extendsc           B   s   e  Z d  Z d Z RS(   s    Represents an extends statement.t   template(   s   template(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRt     s   t   Forc           B   s   e  Z d  Z d Z RS(   sx  The for loop.  `target` is the target for the iteration (usually a
    :class:`Name` or :class:`Tuple`), `iter` the iterable.  `body` is a list
    of nodes that are used as loop-body, and `else_` a list of nodes for the
    `else` block.  If no else node exists it has to be an empty list.

    For filtered nodes an expression can be stored as `test`, otherwise `None`.
    t   targetRN   Rq   t   else_t   testt	   recursive(   s   targets   iters   bodyRx   s   testRz   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyRv     s   t   Ifc           B   s   e  Z d  Z d Z RS(   s4   If `test` is true, `body` is rendered, else `else_`.Ry   Rq   Rx   (   s   tests   bodys   else_(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR{     s   t   Macroc           B   s   e  Z d  Z d Z RS(   s   A macro definition.  `name` is the name of the macro, `args` a list of
    arguments and `defaults` a list of defaults if there are any.  `body` is
    a list of nodes for the macro body.
    R-   t   argst   defaultsRq   (   s   names   argss   defaultss   body(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR|   #  s   t	   CallBlockc           B   s   e  Z d  Z d Z RS(   s   Like a macro without a name but a call instead.  `call` is called with
    the unnamed macro as `caller` argument this node holds.
    t   callR}   R~   Rq   (   s   calls   argss   defaultss   body(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   +  s   t   FilterBlockc           B   s   e  Z d  Z d Z RS(   s   Node for filter sections.Rq   t   filter(   s   bodys   filter(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   2  s   t   Blockc           B   s   e  Z d  Z d Z RS(   s   A node that represents a block.R-   Rq   t   scoped(   s   names   bodyR   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   7  s   t   Includec           B   s   e  Z d  Z d Z RS(   s'   A node that represents the include tag.Ru   t   with_contextt   ignore_missing(   s   templateR   R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   <  s   t   Importc           B   s   e  Z d  Z d Z RS(   s&   A node that represents the import tag.Ru   Rw   R   (   s   templates   targets   with_context(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   A  s   t
   FromImportc           B   s   e  Z d  Z d Z RS(   s  A node that represents the from import tag.  It's important to not
    pass unsafe names to the name attribute.  The compiler translates the
    attribute lookups directly into getattr calls and does *not* use the
    subscript callback of the interface.  As exported variables may not
    start with double underscores (which the parser asserts) this is not a
    problem for regular Jinja code, but if this node is used in an extension
    extra care must be taken.

    The list of names may contain tuples if aliases are wanted.
    Ru   t   namesR   (   s   templates   namess   with_context(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   F  s   
t   ExprStmtc           B   s   e  Z d  Z d Z RS(   sA   A statement that evaluates an expression and discards the result.RC   (   s   node(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   T  s   t   Assignc           B   s   e  Z d  Z d Z RS(   s"   Assigns an expression to a target.Rw   RC   (   s   targets   node(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   Y  s   t   Exprc           B   s)   e  Z d  Z e Z d d  Z d   Z RS(   s   Baseclass for all expressions.c         C   s   t     d S(   sn  Return the value of the expression as constant or raise
        :exc:`Impossible` if this was not possible.

        An :class:`EvalContext` can be provided, if none is given
        a default context is created which requires the nodes to have
        an attached environment.

        .. versionchanged:: 2.4
           the `eval_ctx` parameter was added.
        N(   R   (   R7   t   eval_ctx(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   as_constb  s    c         C   s   t  S(   s8   Check if it's possible to assign something to this node.(   R)   (   R7   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt
   can_assigno  s    N(   R   R   R   Rk   R    RA   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   ^  s   t   BinExprc           B   s,   e  Z d  Z d Z d Z e Z d d  Z RS(   s%   Baseclass for all binary expressions.t   leftt   rightc         C   s   t  |  |  } |  j j r< |  j |  j j k r< t    n  t |  j } y) | |  j j |  |  j	 j |   SWn t
 k
 r t    n Xd  S(   N(   RE   R3   t	   sandboxedt   operatort   intercepted_binopsR   t   _binop_to_funcR   R   R   t	   Exception(   R7   R   t   f(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   z  s    )(   s   lefts   rightN(	   R   R   R   R   RA   R   Rk   R    R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   t  s
   t	   UnaryExprc           B   s,   e  Z d  Z d Z d Z e Z d d  Z RS(   s$   Baseclass for all unary expressions.RC   c         C   s   t  |  |  } |  j j r< |  j |  j j k r< t    n  t |  j } y | |  j j |   SWn t	 k
 r t    n Xd  S(   N(
   RE   R3   R   R   t   intercepted_unopsR   t   _uaop_to_funcRC   R   R   (   R7   R   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   nodeN(	   R   R   R   R   RA   R   Rk   R    R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s
   t   Namec           B   s   e  Z d  Z d Z d   Z RS(   s  Looks up a name or stores a value in a name.
    The `ctx` of the node can be one of the following values:

    -   `store`: store a value in the name
    -   `load`: load that name
    -   `param`: like `store` but if the name was defined as function parameter.
    R-   RD   c         C   s   |  j  d k S(   Nt   truet   falset   noneRk   R)   RA   (   s   trues   falseR   s   Trues   Falses   None(   R-   (   R7   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   names   ctx(   R   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Literalc           B   s   e  Z d  Z e Z RS(   s   Baseclass for literals.(   R   R   R   Rk   R    (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Constc           B   s5   e  Z d  Z d Z d d  Z e d d d   Z RS(   s  All constant values.  The parser will return this node for simple
    constants such as ``42`` or ``"foo"`` but it can be used to store more
    complex values such as lists too.  Only constants with a safe
    representation (objects where ``eval(repr(x)) == x`` is true).
    t   valuec         C   s   |  j  S(   N(   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    c         C   s>   d d l  m } | |  s( t    n  |  | d | d | S(   s   Return a const object if the value is representable as
        constant value in the generated code, otherwise it will raise
        an `Impossible` exception.
        i   (   t   has_safe_reprRG   R3   (   t   compilerR   R   (   R,   R   RG   R3   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   from_untrusted  s    (   s   valueN(   R   R   R   R   RA   R   t   classmethodR   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s
   t   TemplateDatac           B   s    e  Z d  Z d Z d d  Z RS(   s   A constant template string.t   datac         C   sA   t  |  |  } | j r$ t    n  | j r: t |  j  S|  j S(   N(   RE   R6   R   R5   R   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    		(   s   dataN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Tuplec           B   s)   e  Z d  Z d Z d d  Z d   Z RS(   s   For loop unpacking and some other things like multiple arguments
    for subscripts.  Like for :class:`Name` `ctx` specifies if the tuple
    is used for loading the names or storing.
    t   itemsRD   c            s,   t  |       t   f d   |  j D  S(   Nc         3   s   |  ] } | j     Vq d  S(   N(   R   (   Rh   t   x(   R   (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pys	   <genexpr>  s    (   RE   R'   R   (   R7   R   (    (   R   sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    c         C   s(   x! |  j  D] } | j   s
 t Sq
 Wt S(   N(   R   R   R)   Rk   (   R7   RW   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   itemss   ctxN(   R   R   R   R   RA   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Listc           B   s    e  Z d  Z d Z d d  Z RS(   s&   Any list literal such as ``[1, 2, 3]``R   c         C   s2   t  |  |  } g  |  j D] } | j |  ^ q S(   N(   RE   R   R   (   R7   R   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   itemsN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Dictc           B   s    e  Z d  Z d Z d d  Z RS(   se   Any dict literal such as ``{1: 2, 3: 4}``.  The items must be a list of
    :class:`Pair` nodes.
    R   c            s,   t  |       t   f d   |  j D  S(   Nc         3   s   |  ] } | j     Vq d  S(   N(   R   (   Rh   R   (   R   (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pys	   <genexpr>  s    (   RE   t   dictR   (   R7   R   (    (   R   sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   itemsN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Pairc           B   s    e  Z d  Z d Z d d  Z RS(   s   A key, value pair for dicts.t   keyR   c         C   s1   t  |  |  } |  j j |  |  j j |  f S(   N(   RE   R   R   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   keys   valueN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Keywordc           B   s    e  Z d  Z d Z d d  Z RS(   s>   A key, value pair for keyword arguments where key is a string.R   R   c         C   s(   t  |  |  } |  j |  j j |  f S(   N(   RE   R   R   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   keys   valueN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   CondExprc           B   s    e  Z d  Z d Z d d  Z RS(   sZ   A conditional expression (inline if expression).  (``{{
    foo if bar else baz }}``)
    Ry   t   expr1t   expr2c         C   s\   t  |  |  } |  j j |  r1 |  j j |  S|  j d  k rL t    n  |  j j |  S(   N(   RE   Ry   R   R   R   RA   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   tests   expr1s   expr2N(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   
  s   t   Filterc           B   s    e  Z d  Z d Z d	 d  Z RS(
   s  This node applies a filter on an expression.  `name` is the name of
    the filter, the rest of the fields are the same as for :class:`Call`.

    If the `node` of a filter is `None` the contents of the last buffer are
    filtered.  Buffers are created by macros and filter blocks.
    RC   R-   R}   t   kwargst   dyn_argst
   dyn_kwargsc            s  t  |         j s' |  j d  k r3 t    n  |  j j j |  j  } | d  k si t	 | d t
  ru t    n  |  j j    } g  |  j D] } | j    ^ q } t	 | d t
  r | j d    n( t	 | d t
  r | j d |  j  n  t   f d   |  j D  } |  j d  k	 rdy | j |  j j     Wqdt k
 r`t    qdXn  |  j d  k	 ry | j |  j j     Wqt k
 rt    qXn  y | | | |  SWn t k
 rt    n Xd  S(   Nt   contextfiltert   evalcontextfilteri    t   environmentfilterc         3   s   |  ] } | j     Vq d  S(   N(   R   (   Rh   R   (   R   (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pys	   <genexpr>7  s    (   RE   R6   RC   RA   R   R3   t   filtersR#   R-   R"   R)   R   R}   t   insertR   R   R   R!   R   R   R>   (   R7   R   t   filter_t   objR   R}   R   (    (   R   sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   %  s6    %(   s   nodes   names   argss   kwargss   dyn_argss
   dyn_kwargsN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Testc           B   s   e  Z d  Z d Z RS(   s   Applies a test on an expression.  `name` is the name of the test, the
    rest of the fields are the same as for :class:`Call`.
    RC   R-   R}   R   R   R   (   s   nodes   names   argss   kwargss   dyn_argss
   dyn_kwargs(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   H  s   t   Callc           B   s    e  Z d  Z d Z d d  Z RS(	   s/  Calls an expression.  `args` is a list of arguments, `kwargs` a list
    of keyword arguments (list of :class:`Keyword` nodes), and `dyn_args`
    and `dyn_kwargs` has to be either `None` or a node that is used as
    node for dynamic positional (``*args``) or keyword (``**kwargs``)
    arguments.
    RC   R}   R   R   R   c            s  t  |         j r$ t    n  |  j j    } g  |  j D] } | j    ^ q@ } t | t  r t | d t	  r t    q t | d t	  r | j
 d    q t | d t	  r | j
 d |  j  q n  t   f d   |  j D  } |  j d  k	 rCy | j |  j j     WqCt k
 r?t    qCXn  |  j d  k	 ry | j |  j j     Wqt k
 rt    qXn  y | | |   SWn t k
 rt    n Xd  S(   Nt   contextfunctiont   evalcontextfunctioni    t   environmentfunctionc         3   s   |  ] } | j     Vq d  S(   N(   R   (   Rh   R   (   R   (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pys	   <genexpr>h  s    (   RE   R6   R   RC   R   R}   RT   t   _context_function_typesR"   R)   R   R3   R   R   R   RA   R!   R   R   R>   (   R7   R   R   R   R}   R   (    (   R   sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   X  s6    	%(   s   nodes   argss   kwargss   dyn_argss
   dyn_kwargsN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   O  s   t   Getitemc           B   s)   e  Z d  Z d Z d d  Z d   Z RS(   s@   Get an attribute or item from an expression and prefer the item.RC   RO   RD   c         C   sz   t  |  |  } |  j d k r* t    n  y/ |  j j |  j j |  |  j j |   SWn t k
 ru t    n Xd  S(   Nt   load(	   RE   RD   R   R3   t   getitemRC   R   RO   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   }  s    c         C   s   t  S(   N(   R)   (   R7   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   nodes   args   ctxN(   R   R   R   R   RA   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   y  s   
t   Getattrc           B   s)   e  Z d  Z d Z d d  Z d   Z RS(   sn   Get an attribute or item from an expression that is a ascii-only
    bytestring and prefer the attribute.
    RC   R0   RD   c         C   sq   |  j  d k r t    n  y5 t |  |  } |  j j |  j j |  |  j  SWn t k
 rl t    n Xd  S(   NR   (	   RD   R   RE   R3   R"   RC   R   R0   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    c         C   s   t  S(   N(   R)   (   R7   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   nodes   attrs   ctxN(   R   R   R   R   RA   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   
t   Slicec           B   s    e  Z d  Z d Z d d  Z RS(   s_   Represents a slice object.  This must only be used as argument for
    :class:`Subscript`.
    t   startt   stopt   stepc            sI   t  |         f d   } t | |  j  | |  j  | |  j   S(   Nc            s   |  d  k r d  S|  j    S(   N(   RA   R   (   R   (   R   (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   const  s    (   RE   t   sliceR   R   R   (   R7   R   R   (    (   R   sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   starts   stops   stepN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Concatc           B   s    e  Z d  Z d Z d d  Z RS(   sX   Concatenates the list of expressions provided after converting them to
    unicode.
    Rs   c            s/   t  |       d j   f d   |  j D  S(   NRI   c         3   s$   |  ] } t  | j     Vq d  S(   N(   R   R   (   Rh   R   (   R   (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pys	   <genexpr>  s    (   RE   Ri   Rs   (   R7   R   (    (   R   sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   nodesN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Comparec           B   s    e  Z d  Z d Z d d  Z RS(   si   Compares an expression with some other expressions.  `ops` must be a
    list of :class:`Operand`\s.
    t   exprt   opsc         C   s   t  |  |  } |  j j |  } } yF x? |  j D]4 } | j j |  } t | j | |  } | } q2 WWn t k
 r t    n X| S(   N(   RE   R   R   R   t   _cmpop_to_funct   opR   R   (   R7   R   R\   R   R   t	   new_value(    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    (   s   exprs   opsN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Operandc           B   s   e  Z d  Z d Z RS(   s$   Holds an operator and an expression.R   R   (   s   ops   expr(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   s(   
The following operators are available: s   , c         c   s   |  ] } d  | Vq d S(   s   ``%s``N(    (   Rh   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pys	   <genexpr>  s    t   Mulc           B   s   e  Z d  Z d Z RS(   s(   Multiplies the left with the right node.R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Divc           B   s   e  Z d  Z d Z RS(   s#   Divides the left by the right node.R	   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   FloorDivc           B   s   e  Z d  Z d Z RS(   sj   Divides the left by the right node and truncates conver the
    result into an integer by truncating.
    s   //(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Addc           B   s   e  Z d  Z d Z RS(   s   Add the left to the right node.R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Subc           B   s   e  Z d  Z d Z RS(   s'   Substract the right from the left node.R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Modc           B   s   e  Z d  Z d Z RS(   s   Left modulo right.R
   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Powc           B   s   e  Z d  Z d Z RS(   s   Left to the power of right.s   **(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Andc           B   s    e  Z d  Z d Z d d  Z RS(   s   Short circuited AND.t   andc         C   s1   t  |  |  } |  j j |  o0 |  j j |  S(   N(   RE   R   R   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    N(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Orc           B   s    e  Z d  Z d Z d d  Z RS(   s   Short circuited OR.t   orc         C   s1   t  |  |  } |  j j |  p0 |  j j |  S(   N(   RE   R   R   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s    N(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Notc           B   s   e  Z d  Z d Z RS(   s   Negate the expression.R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Negc           B   s   e  Z d  Z d Z RS(   s   Make the expression negative.R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   Posc           B   s   e  Z d  Z d Z RS(   s8   Make the expression positive (noop for most expressions)R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   EnvironmentAttributec           B   s   e  Z d  Z d Z RS(   s   Loads an attribute from the environment object.  This is useful for
    extensions that want to call a callback stored on the environment.
    R-   (   s   name(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   t   ExtensionAttributec           B   s   e  Z d  Z d Z RS(   s   Returns the attribute of an extension bound to the environment.
    The identifier is the identifier of the :class:`Extension`.

    This node is usually constructed by calling the
    :meth:`~jinja2.ext.Extension.attr` method on an extension.
    t
   identifierR-   (   R   s   name(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   &  s   t   ImportedNamec           B   s   e  Z d  Z d Z RS(   s&  If created with an import name the import name is returned on node
    access.  For example ``ImportedName('cgi.escape')`` returns the `escape`
    function from the cgi module on evaluation.  Imports are optimized by the
    compiler so there is no need to assign them to local variables.
    t
   importname(   R   (   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   0  s   t   InternalNamec           B   s   e  Z d  Z d Z d   Z RS(   s7  An internal name in the compiler.  You cannot create these nodes
    yourself but the parser provides a
    :meth:`~jinja2.parser.Parser.free_identifier` method that creates
    a new identifier for you.  This identifier is not available from the
    template and is not threated specially by the compiler.
    R-   c         C   s   t  d   d  S(   NsK   Can't create internal names.  Use the `free_identifier` method on a parser.(   RJ   (   R7   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR9   B  s    (   s   name(   R   R   R   R   R9   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   9  s   t   MarkSafec           B   s    e  Z d  Z d Z d d  Z RS(   s:   Mark the wrapped expression as safe (wrap it as `Markup`).R   c         C   s%   t  |  |  } t |  j j |   S(   N(   RE   R   R   R   (   R7   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   K  s    (   s   exprN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   G  s   t   MarkSafeIfAutoescapec           B   s    e  Z d  Z d Z d d  Z RS(   s   Mark the wrapped expression as safe (wrap it as `Markup`) but
    only if autoescaping is active.

    .. versionadded:: 2.5
    R   c         C   sM   t  |  |  } | j r$ t    n  |  j j |  } | j rI t |  S| S(   N(   RE   R6   R   R   R   R5   R   (   R7   R   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   X  s    		
(   s   exprN(   R   R   R   R   RA   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   P  s   t   ContextReferencec           B   s   e  Z d  Z RS(   sr  Returns the current template context.  It can be used like a
    :class:`Name` node, with a ``'load'`` ctx and will return the
    current :class:`~jinja2.runtime.Context` object.

    Here an example that assigns the current template name to a
    variable named `foo`::

        Assign(Name('foo', ctx='store'),
               Getattr(ContextReference(), 'name'))
    (   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   b  s   
t   Continuec           B   s   e  Z d  Z RS(   s   Continue a loop.(   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   o  s   t   Breakc           B   s   e  Z d  Z RS(   s   Break a loop.(   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   s  s   t   Scopec           B   s   e  Z d  Z d Z RS(   s   An artificial scope.Rq   (   s   body(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   w  s   t   EvalContextModifierc           B   s   e  Z d  Z d Z RS(   s
  Modifies the eval context.  For each option that should be modified,
    a :class:`Keyword` has to be added to the :attr:`options` list.

    Example to change the `autoescape` setting::

        EvalContextModifier(options=[Keyword('autoescape', Const(True))])
    t   options(   s   options(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR   |  s   t   ScopedEvalContextModifierc           B   s   e  Z d  Z d Z RS(   s   Modifies the eval context and reverts it later.  Works exactly like
    :class:`EvalContextModifier` but will only modify the
    :class:`~jinja2.nodes.EvalContext` for nodes in the :attr:`body`.
    Rq   (   s   body(   R   R   R   R   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyR     s   c          O   s   t  d   d  S(   Ns   can't create custom node types(   RJ   (   R}   R   (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   _failing_new  s    (m   R   R   t   collectionsR    t   jinja2.utilsR   t   jinja2._compatR   R   R   R   R   R   R   t   mult   truedivt   floordivt   powt   modt   addt   subR   t   not_t   post   negR   R   R   R   t   geR   t   leR   R   R   R*   R   Rl   R2   RE   RF   Rn   Ro   Rp   Rr   Rt   Rv   R{   R|   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   Ri   t   sortedR&   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   t   staticmethodR+   (    (    (    sR   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/jinja2/nodes.pyt   <module>   s   .














	
			,*
-		
				 