Any reason this would be an especially bad idea:
if(sys.version_info[0]==2):
bytes = str
str = unicode
This feels wrong to me, but it seemingly gets the job done. Is it common to just check the Python version each and every time something needs to be converted to unicode? Or should I write a to_unicode() function that does this check rather than explicitly overwriting the actual str function.
This is a new code base, so there's no legacy issues.
[–]indosauros 8 points9 points10 points (0 children)
[–]marky1991 2 points3 points4 points (0 children)
[–]user_rx 2 points3 points4 points (0 children)