Skip to content

Commit bfcf9d3

Browse files
authored
Merge pull request #51 from zaataylor/master
Simplified common.py unique static method
2 parents 4a9acfb + 3927e60 commit bfcf9d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

common.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ def filter_impossible_names(top_words):
7373

7474
@staticmethod
7575
def unique(sequence):
76-
unique = []
77-
[unique.append(item) for item in sequence if item not in unique]
78-
return unique
76+
return list(set(sequence))
7977

8078
@staticmethod
8179
def parse_results(result, pc_info_dict, topk=5):

0 commit comments

Comments
 (0)