Changeset 1083

Show
Ignore:
Timestamp:
11/21/06 06:42:22 (2 years ago)
Author:
arjanmol
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/branches/new-canvas/gaphor/misc/ipair.py

    r1082 r1083  
     1""" 
     2ipair function 
     3""" 
     4 
    15def ipair(l): 
    26    """ 
     7    This module contains a small utility function that can be used to iterate 
     8    over a list of items, each item is returned with it's next item. 
     9 
    310    >>> for a, b in ipair((1,2,3,4,5,6)): 
    411    ...     print a, b 
     
    1522        yield i1.next(), i2.next() 
    1623 
    17 import doctest 
    18 doctest.testmod() 
     24if __name__ == '__main__': 
     25    import doctest 
     26    doctest.testmod()