*: python3 update
Main changes are:
-
python3 is more strict when compare
strandbyte, it raise error. thus we need toencodeanddecodewhen do comparaison -
unicodeis 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, )):