Changeset 5372:f4a7d9edec42 in livinglogic.python.xist

Show
Ignore:
Timestamp:
03/04/13 11:56:04 (7 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Fix typos. Enhance UL4 function description.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • docs/UL4.rst

    r5355 r5372  
    12481248 
    12491249``insert`` is a list method. Its first argument in the insert position, the 
    1250 remaining arguments are the intems that will be inserted at that position, so:: 
     1250remaining arguments are the items that will be inserted at that position, so:: 
    12511251 
    12521252    <?code v = [1, 4]?> 
     
    12811281UL4 templates can be used as functions too. Calling a template as a function 
    12821282will ignore any output from the template. The return value will be the value of 
    1283 the first ``<?return?>`` tag:: 
     1283the first ``<?return?>`` tag encountered:: 
    12841284 
    12851285    from ll import ul4c 
    12861286 
    1287     code = ''' 
     1287    code = """ 
    12881288        <?for item in data?> 
    12891289            <?if "i" in item?> 
     
    12911291            <?end if?> 
    12921292        <?end for?> 
    1293     ''' 
     1293    """ 
    12941294 
    12951295    function = ul4c.Function(code) 
     
    13011301When no ``<?return?>`` tag is encountered, ``None`` will be returned. 
    13021302 
    1303 When a ``<?return?>`` tag is encountered when the template is used as a template, 
    1304 output will simply stop. 
    1305  
     1303When a ``<?return?>`` tag is encountered when the template is used as a 
     1304template, output will simply stop and the return value will be ignored. 
    13061305 
    13071306 
     
    13091308========== 
    13101309 
    1311 It is possible to specify alternative delimiters from the template tags:: 
     1310It is possible to specify alternative delimiters for the template tags:: 
    13121311 
    13131312    >>> from ll import ul4c