Handle types in a Python 3 friendly way

This commit is contained in:
Marc Abramowitz
2014-04-16 14:13:06 -07:00
parent 182011eb18
commit 9440a0d4df
5 changed files with 18 additions and 11 deletions

8
MySQLdb/compat.py Normal file
View File

@ -0,0 +1,8 @@
import sys
if sys.version_info[0] == 3:
unicode = str
unichr = chr
else:
unicode = unicode
unichr = unichr