blob: 3854e95cdb3adc6c5772d2e332e3adaae83dbe8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
--- a/bert/codec.py 2018-03-07 20:11:38.117925147 -0800
+++ b/bert/codec.py 2018-03-07 20:12:19.681258078 -0800
@@ -92,7 +92,7 @@
return (Atom("bert"), Atom("false"))
elif obj is None:
return (Atom("bert"), Atom("nil"))
- elif isinstance(obj, basestring) and not self.__is_ascii(obj):
+ elif isinstance(obj, str) and not self.__is_ascii(obj):
return (Atom("bert"), Atom("string"), Atom(self.encoding.upper()), obj.encode(self.encoding))
elif isinstance(obj, dict):
return (Atom("bert"), Atom("dict"), [(self.convert(k), self.convert(v)) for k, v in obj.items()])
|