src/pyams_utils/list.py
changeset 119 664b86f16a91
parent 72 9049384a2bd4
child 210 4f9a1501bba6
equal deleted inserted replaced
118:de78bbbc9f50 119:664b86f16a91
    21 
    21 
    22 
    22 
    23 def unique(seq, idfun=None):
    23 def unique(seq, idfun=None):
    24     """Extract unique values from list, preserving order
    24     """Extract unique values from list, preserving order
    25 
    25 
    26     :param list seq: input list
    26     :param iterator seq: input list
    27     :param callable idfun: an identity function which is used to get 'identity' value of each element
    27     :param callable idfun: an identity function which is used to get 'identity' value of each element
    28         in the list
    28         in the list
    29     :return: list; a new list containing only unique elements of the original list in their initial order.
    29     :return: list; a new list containing only unique elements of the original list in their initial order.
    30         Original list is not modified.
    30         Original list is not modified.
    31 
    31