Show
Ignore:
Timestamp:
07/28/08 00:46:25 (4 months ago)
Author:
athomas
Message:

Docstring updates.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cly/trunk/cly/builder.py

    r583 r584  
    431431        default is to use the content of self.help(). 
    432432 
    433         Arguments: 
    434  
    435             :text: Text entered so far. 
     433        :param text: Text entered so far. 
    436434 
    437435        >>> grammar = Grammar(one=Node(), two=Node()) 
     
    448446        """Find a Node by path rooted at this node. 
    449447 
    450         Arguments: 
    451  
    452             :path: "Path" to the node, or a label. 
     448        :param path: "Path" to the node, or a label. 
     449        :returns: Found node. 
    453450 
    454451        >>> top = Node(name='top', one=Node(), 
     
    494491        will be preserved and the merging nodes children merged. 
    495492 
    496         Arguments: 
    497  
    498             :node: Node to merge into this. 
     493        :param node: Node to merge into this. 
    499494        """ 
    500495        self.__anonymous_children += node.__anonymous_children 
     
    520515        :param value: Value to cast. 
    521516 
    522         :rtype: Tuple of (value, options) where options is a dictionary of 
    523                 extra Node constructor arguments. 
     517        :returns: Tuple of (value, options) where options is a dictionary of 
     518                  extra Node constructor arguments. 
    524519        """ 
    525520        casts = { 
     
    647642    """Group subnodes under a single group ID. 
    648643 
    649     Arguments: 
    650         :id: Group ID. 
     644    :param id: Group ID. 
    651645    """ 
    652646    def __init__(self, id=None, *args, **kwargs): 
     
    666660    are supported. 
    667661 
    668     Arguments: 
    669  
    670         :target: 
    671             Relative or absolute path to the aliased node. If the alias contains 
    672             glob characters (``*`` or ``?``) all matching nodes are aliased. 
     662    :param target: 
     663        Relative or absolute path to the aliased node. If the alias contains 
     664        glob characters (``*`` or ``?``) all matching nodes are aliased. 
    673665 
    674666    >>> from cly.parser import Parser, Context 
     
    739731    A node that masquerades as its children, if a condition is true. 
    740732 
    741     Arguments: 
    742  
    743         :test: A callable with the signature ``test(context)``. 
    744                Returns ``True`` if masqueraded nodes are accessible. 
     733    :param test: A callable with the signature ``test(context)``. 
     734                 Returns ``True`` if masqueraded nodes are accessible. 
    745735 
    746736    All other arguments are passed through to the default :class:`Node` constructor. 
     
    809799    """Matches EOL and executes ``callback``. 
    810800 
    811     Arguments: 
    812  
    813         :callback: Callback to execute when the action is chosen. 
    814  
    815     Attributes: 
    816  
    817         .. attribute:: with_context 
    818  
    819             If True, passes the current parse :class:`~cly.parser.Context` as the 
    820             first argument. 
     801    :param callback: Callback to execute when the action is chosen. 
     802 
     803    :var with_context: 
     804        If True, passes the current parse :class:`~cly.parser.Context` as the 
     805        first argument. 
    821806 
    822807    >>> from cly.parser import Parser, Context