git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ee74f6
)
python: Add `text_type` Python 2/3 compatible function name.
author
Lumir Balhar
<lbalhar@redhat.com>
Fri, 9 Feb 2018 19:49:36 +0000
(20:49 +0100)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 14 Feb 2018 23:18:29 +0000
(
00:18
+0100)
This compatible function name represents `str` in Python 3
and `unicode` in Python 2.
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/compat.py
patch
|
blob
|
history
diff --git
a/python/samba/compat.py
b/python/samba/compat.py
index dfdfb7dd81ee6c789a9fc3d19e38502d8d719f9f..667a1a443b1786cebf6cca6221fcbbf25764c289 100644
(file)
--- a/
python/samba/compat.py
+++ b/
python/samba/compat.py
@@
-23,5
+23,7
@@
PY3 = sys.version_info[0] == 3
if PY3:
integer_types = int,
+ text_type = str
else:
integer_types = (int, long)
+ text_type = unicode