From 0f601b8b750a8991d333a7a95f97b74b80b46846 Mon Sep 17 00:00:00 2001 From: "Yubing (Tom) Dong" Date: Wed, 7 Oct 2015 01:27:28 -0700 Subject: [PATCH] Update docstring of Doc.__getitem__ --- spacy/tokens/doc.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index b78214ba9..eab6c044e 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -82,10 +82,10 @@ cdef class Doc: self._vector = None def __getitem__(self, object i): - """Get a token. + """Get a Token or a Span from the Doc. Returns: - token (Token): + token (Token) or span (Span): """ if isinstance(i, slice): start, stop = normalize_slice(len(self), i.start, i.stop, i.step)