mirror of https://github.com/explosion/spaCy.git
Remove deprecation shim around str/bytes in Token.
This commit is contained in:
parent
b67697a97b
commit
7fd98fc91c
|
@ -43,19 +43,9 @@ cdef class Token:
|
||||||
return self.c.lex.length
|
return self.c.lex.length
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
# Users can toggle this on to preserve former buggy semantics.
|
|
||||||
# Remove this in future versions.
|
|
||||||
if _STR_TRAILING_WHITESPACE:
|
|
||||||
return self.text_with_ws
|
|
||||||
else:
|
|
||||||
return self.text
|
return self.text
|
||||||
|
|
||||||
def __bytes__(self):
|
def __bytes__(self):
|
||||||
# Users can toggle this on to preserve former buggy semantics.
|
|
||||||
# Remove this in future versions.
|
|
||||||
if _STR_TRAILING_WHITESPACE:
|
|
||||||
return self.text_with_ws.encode('utf8')
|
|
||||||
else:
|
|
||||||
return self.text.encode('utf8')
|
return self.text.encode('utf8')
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in New Issue