how to convert Python 2 unicode() function into correct Python 3.x syntax
问题 I enabled the compatibility check in my Python IDE and now I realize that the inherited Python 2.7 code has a lot of calls to unicode() which are not allowed in Python 3.x. I looked at the docs of Python2 and found no hint how to upgrade: I don't want to switch to Python3 now, but maybe in the future. The code contains about 500 calls to unicode() How to proceed? Update The comment of user vaultah to read the pyporting guide has received several upvotes. My current solution is this (thanks to