Skip to content

Commit 42a64a5

Browse files
committed
Add _compat module for 2.x / 3.x compatibility
1 parent b0215ed commit 42a64a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

qencode/_compat.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# flake8: NOQA
2+
import sys
3+
4+
PY2 = sys.version_info[0] == 2
5+
6+
7+
if PY2:
8+
string_types = (str, unicode)
9+
else:
10+
string_types = (str,)

0 commit comments

Comments
 (0)