mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-30 15:37:29 +03:00 
			
		
		
		
	Remove deprecation shim around str/bytes in Token.
This commit is contained in:
		
							parent
							
								
									b67697a97b
								
							
						
					
					
						commit
						7fd98fc91c
					
				|  | @ -43,20 +43,10 @@ cdef class Token: | |||
|         return self.c.lex.length | ||||
| 
 | ||||
|     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): | ||||
|         # 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): | ||||
|         if six.PY3: | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user