diff options
| author | Scott Gasch <[email protected]> | 2022-02-09 22:18:59 -0800 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-02-09 22:18:59 -0800 |
| commit | c974b8cde11f133df7680967b759772c624007e9 (patch) | |
| tree | 9d6e60f8cd2317c4b836ca65696d956b644a7bc1 /logical_search.py | |
| parent | 804988efe7c8b131fc0c4b30088de2b5c5bd0b74 (diff) | |
More spring cleaning.
Diffstat (limited to 'logical_search.py')
| -rw-r--r-- | logical_search.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/logical_search.py b/logical_search.py index 41ed729..c85b262 100644 --- a/logical_search.py +++ b/logical_search.py @@ -183,7 +183,7 @@ class Corpus(object): def invert_docid_set(self, original: Set[str]) -> Set[str]: """Invert a set of docids.""" - return set([docid for docid in self.documents_by_docid.keys() if docid not in original]) + return {docid for docid in self.documents_by_docid if docid not in original} def get_doc(self, docid: str) -> Optional[Document]: """Given a docid, retrieve the previously added Document.""" |
