Merge pull request #732 from danielhers/patch-1

Avoid "True if ... else False"
This commit is contained in:
Matthew Honnibal 2017-01-11 20:48:37 +11:00 committed by GitHub
commit 5693cea4d6
1 changed files with 1 additions and 1 deletions

View File

@ -305,7 +305,7 @@ cdef class Vocab:
''' '''
key = hash_string(string) key = hash_string(string)
lex = self._by_hash.get(key) lex = self._by_hash.get(key)
return True if lex is not NULL else False return lex is not NULL
def __iter__(self): def __iter__(self):
'''Iterate over the lexemes in the vocabulary. '''Iterate over the lexemes in the vocabulary.