Changeset 5341:b81d145e27de in livinglogic.python.xist

Show
Ignore:
Timestamp:
02/12/13 09:48:31 (6 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Revert documentation and doc strings: <?template?> -> <?def?>

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • docs/UL4.rst

    r5331 r5341  
    404404 
    405405UL4 templates support lexical scopes. This means that a template that is defined 
    406 (via ``<?template?>``) inside another template has access to the local variables 
     406(via ``<?def?>``) inside another template has access to the local variables 
    407407of the outer template. The inner template sees that state of the variables at 
    408 the point in time when the ``<?template?>`` tag was executed. The following 
    409 example will output ``1``:: 
     408the point in time when the ``<?def?>`` tag was executed. The following example 
     409will output ``1``:: 
    410410 
    411411    <?code i = 1?> 
    412     <?template x?> 
     412    <?def x?> 
    413413        <?print i?> 
    414     <?end template?> 
     414    <?end def?> 
    415415    <?code i = 2?> 
    416416    <?render x.render()?> 
  • src/ll/ul4c.py

    r5340 r5341  
    22602260        """ 
    22612261        # ``location``/``endlocation`` will remain ``None`` for a top level template 
    2262         # For a subtemplate/subfunction ``location`` will be set to the location of the ``<?template?>`` tag 
    2263         # in :meth:`_compile` and ``endlocation`` will be the location of the ``<?end template?>`` tag 
     2262        # For a subtemplate/subfunction ``location`` will be set to the location of the ``<?def?>`` tag in :meth:`_compile` 
     2263        # and ``endlocation`` will be the location of the ``<?end def?>`` tag 
    22642264        super().__init__(None) 
    22652265        self.keepws = keepws