Update docstring of Doc.__getitem__

This commit is contained in:
Yubing (Tom) Dong 2015-10-07 01:27:28 -07:00
parent 3fd3bc79aa
commit 0f601b8b75

View File

@ -82,10 +82,10 @@ cdef class Doc:
self._vector = None self._vector = None
def __getitem__(self, object i): def __getitem__(self, object i):
"""Get a token. """Get a Token or a Span from the Doc.
Returns: Returns:
token (Token): token (Token) or span (Span):
""" """
if isinstance(i, slice): if isinstance(i, slice):
start, stop = normalize_slice(len(self), i.start, i.stop, i.step) start, stop = normalize_slice(len(self), i.start, i.stop, i.step)