Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 7857ba7

Browse files
cclaussCopybara-Service
authored and
Copybara-Service
committed
internal merge of PR #1318
PiperOrigin-RevId: 227921102
1 parent 3740f2e commit 7857ba7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tensor2tensor/data_generators/text_encoder.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,7 @@ def unicode_to_native(s):
7878

7979

8080
def is_unicode(s):
81-
if six.PY2:
82-
if isinstance(s, unicode):
83-
return True
84-
else:
85-
if isinstance(s, str):
86-
return True
87-
return False
81+
return isinstance(s, six.text_type)
8882

8983

9084
def to_unicode(s, ignore_errors=False):

0 commit comments

Comments
 (0)