Changeset 396

Show
Ignore:
Timestamp:
02/15/07 00:49:38 (2 years ago)
Author:
athomas
Message:

pyndexter: More docstring updates.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pyndexter/trunk/pyndexter/__init__.py

    r393 r396  
    1616for performing automatic updates. 
    1717 
    18 An example of indexing all .txt files underneath /usr/share/doc: 
     18An example of indexing all .txt files underneath ``/usr/share/doc``: 
     19 
     20:: 
    1921 
    2022    import os 
     
    119121    attributes must be unicode, including the content. 
    120122 
    121     content:: is optional, and if not provided will be fetched from the 
    122     `source`. If it is a callable, it will be called to fetch the content, 
    123     passing the uri as the only argument. 
    124  
    125     change:: should be a numeric value representing the current point in the 
    126     documents lifetime. Typically a timestamp, but could be a revision number, 
    127     etc. 
    128  
    129     source:: is the Source object where this documents content can be lazily 
    130     fetched from. """ 
     123    ``content`` 
     124        Optional, and if not provided will be fetched from the `source`. If it 
     125        is a callable, it will be called to fetch the content, passing the uri 
     126        as the only argument. 
     127 
     128    ``change`` 
     129        Should be a numeric value representing the current point in the 
     130        documents lifetime. Typically a timestamp, but could be a revision 
     131        number, etc. 
     132 
     133    ``source`` 
     134        Is the Source object where this documents content can be lazily fetched 
     135        from. """ 
    131136 
    132137    __slots__ = ('attributes', '_content', 'source', 'quality') 
     
    177182 
    178183    Determing what has changed is achieved with the state() and difference() 
    179     methods. The ''state'' of a source is the minimum information required to 
     184    methods. The `state` of a source is the minimum information required to 
    180185    be able to determine what has changed. For FileSource this is a list of all 
    181186    files and their modification times, for a SubversionSource it would be as 
    182     simple as the changeset number. By default, `marshal()` and 
    183     `difference()` assume that `_state` will contain a dictionary of 
     187    simple as the changeset number. By default, ``marshal()`` and 
     188    ``difference()`` assume that ``_state`` will contain a dictionary of 
    184189    uri:modification-time mappings. 
    185190