linkding/bookmarks/utils.py

3 lines
101 B
Python

def unique(elements, key):
return list({key(element): element for element in elements}.values())