We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce592ed commit 5643161Copy full SHA for 5643161
1 file changed
abe/utils.py
@@ -3,6 +3,9 @@
3
4
_PY3 = sys.version_info >= (3, 0)
5
6
+if _PY3:
7
+ unicode = str
8
+
9
10
def datetime_to_string(value):
11
representation = value.isoformat()
@@ -22,7 +25,6 @@ def to_unicode(data):
22
25
else:
23
26
data = str(data)
24
27
- if not _PY3:
- if isinstance(data, str):
- data = unicode(data)
28
+ if not _PY3 and isinstance(data, str):
29
+ data = unicode(data)
30
return data
0 commit comments