*: python3 update
Main changes are:
-
python3 is more strict when compare
str
andbyte
, it raise error. thus we need toencode
anddecode
when do comparaison -
unicode
is removed inpython3
, to keep compability, i use six.string_types which(str, unicode)
inPython 2
,(str,)
inPython 3
- if normalize and isinstance(item, (str, unicode)):
+ if normalize and isinstance(item, six.string_types + (bytes, )):