equal
deleted
inserted
replaced
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 |