I'm not sure why I can iterate over an object that is not an iterator?
>>> import spacy
>>> nlp = spacy.load("en_core_web_sm")
>>> doc = nlp("Berlin looks like a nice city")
>>> next(doc)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'spacy.tokens.doc.Doc' object is not an iterator
>>> for token in doc:
... print(token)
...
Berlin
looks
like
a
nice
city
for ... in ...) over a lot of things, lists, strings, tuples, range... these don't havenexteither.