Changeset 2852:f4632abdb32b in livinglogic.python.xist

Show
Ignore:
Timestamp:
08/03/07 17:12:47 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add docstring to xfind.nthchild.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/xfind.py

    r2850 r2852  
    11751175    </example> 
    11761176    """ 
     1177 
    11771178    def __init__(self, func): 
    11781179        self.func = func 
     
    11861187 
    11871188class nthchild(Selector): 
     1189    """ 
     1190    <par>An <class>nthchild</class> is a selector selects each node which is 
     1191    the n-th child of its parent. E.g. <lit>nthchild(0)</lit> selects each 
     1192    first child, <lit>nthchild(-1)</lit> selects each last child. Furthermore 
     1193    <lit>nthchild("even")</lit> selects each first, third, ... child and 
     1194    <lit>nthchild("odd")</lit> selects each second, fourth, ... child.</par> 
     1195    """ 
     1196 
    11881197    def __init__(self, index): 
    11891198        self.index = index