From 8e603cc917eb0a291e59754e882468446aa2c010 Mon Sep 17 00:00:00 2001 From: Daniel Hershcovich Date: Wed, 11 Jan 2017 11:18:22 +0200 Subject: [PATCH] Avoid "True if ... else False" --- spacy/vocab.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index cce85e095..7b9b705dc 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -305,7 +305,7 @@ cdef class Vocab: ''' key = hash_string(string) lex = self._by_hash.get(key) - return True if lex is not NULL else False + return lex is not NULL def __iter__(self): '''Iterate over the lexemes in the vocabulary.