Changeset 2853:4126f87bf5cb in livinglogic.python.xist

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

Enhance/add docstrings to xfind.nthchild() and xfind.nthoftype(). Fix entity in docstring.

Files:
1 modified

Legend:

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

    r2852 r2853  
    140140    def cssweight(self): 
    141141        """ 
    142         Return the &CSS; specificity of <self/> as a 
     142        Return the &css; specificity of <self/> as a 
    143143        <pyref class="CSSWeight"><class>CSSWeight</class></pyref> object. 
    144144        """ 
     
    11881188class nthchild(Selector): 
    11891189    """ 
    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> 
     1190    <par>An <class>nthchild</class> object is a selector that selects every node 
     1191    that is the n-th child of its parent. E.g. <lit>nthchild(0)</lit> selects 
     1192    every first child, <lit>nthchild(-1)</lit> selects each last child. 
     1193    Furthermore <lit>nthchild("even")</lit> selects each first, third, ... child 
     1194    and <lit>nthchild("odd")</lit> selects each second, fourth, ... child.</par> 
    11951195    """ 
    11961196 
     
    12161216 
    12171217class nthoftype(Selector): 
     1218    """ 
     1219    <par>An <class>nthchild</class> object is a selector that selects every node 
     1220    that is the n-th node of a specified type. Similar to 
     1221    <pyref class="nthchild"><class>nthchild</class></pyref> <class>nthchild</class> 
     1222    supports negative and positive indices as well as <lit>"even"</lit> and 
     1223    <lit>"odd"</lit>.</par> 
     1224    """ 
     1225 
    12181226    def __init__(self, index, *types): 
    12191227        self.index = index