Changeset 582

Show
Ignore:
Timestamp:
07/21/08 00:27:05 (2 months ago)
Author:
athomas
Message:

cull_candidates() can be chained.

Files:

Legend:

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

    r581 r582  
    17171717    >>> cull_candidates(['bob', 'fred', 'barry', 'harry'], 'b') 
    17181718    ['bob ', 'barry '] 
    1719     """ 
    1720     return [c + sep for c in candidates if c and c.startswith(text)] 
     1719    >>> cull_candidates(cull_candidates(['bob', 'fred', 'barry', 'harry'], 'b'), 'b') 
     1720    ['bob ', 'barry '] 
     1721    """ 
     1722    return [c.rstrip(sep) + sep for c in candidates if c and c.startswith(text)]