mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-26 08:30:48 +03:00
Use yield from syntax
This commit is contained in:
parent
f37d078d6a
commit
6381ebfb14
|
@ -431,8 +431,7 @@ cdef class Doc:
|
||||||
"""
|
"""
|
||||||
def __get__(self):
|
def __get__(self):
|
||||||
if 'sents' in self.user_hooks:
|
if 'sents' in self.user_hooks:
|
||||||
for sent in self.user_hooks['sents'](self):
|
yield from self.user_hooks['sents'](self)
|
||||||
yield sent
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.is_parsed:
|
if not self.is_parsed:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user