On 08/27/2015 08:07 AM, David Kupka wrote:
> On 26/08/15 17:49, Tomas Babej wrote:
>>
>>
>> On 08/26/2015 03:16 PM, David Kupka wrote:
>>> https://fedorahosted.org/freeipa/ticket/5248
>>>
>>>
>>
>> +def deduplicate(lst):
>> +    new_lst = []
>> +    s = set(lst)
>> +    for i in lst:
>> +        if i in s:
>> +            s.remove(i)
>> +            new_lst.append(i)
>> +
>> +    return new_lst
>> +
>>
>> Imho, this method deserves a docstring or at least a comment. It is not
>> entrirely clear from the name, that its job is to remove the duplicates
>> while preserving the order of the entries.
>>
> 
> You're right, line or two could not hurt. Patch attached.

Obvious ACK from me.

Pushed to:
master: 5ff4170ff9cab64d3527001de8214cb30439e3e3
ipa-4-2: 9e3d0d6f591496a2370a14832f7c0c399a16b2ea

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to